Ruby on Rails tutorial by Michael Hartl

https://lh3.googleusercontent.com/-o2gbqN30EsM/V0dsLwo9ybI/AAAAAAAABGk/2L8tE4SSAvQkNth0yBbrlg5GXPjbhLtqwCLcB/s1600/Clipboard01.jpg
Hello,

I am doing this tutorial, currently in Chapter 5. I am testing listing
5.26
but get the feeling that not all is set up like it should.
The message: RubyDep: WARNING: Your Ruby is: 2.3.0 (buggy).
Recommendation: install 2.3.1.

a bit alarming.
Can someone help with tips our suggestions?

Thank you,
Ad

If you are able to, do an upgrade. If you can’t just ignore the warning…
In
any case, it is not related to the remaining message you screenshotted
instead of copy pasting… Just read along after the warning lines and
take a
closer look at the actual error, it gives you very good hints on how to
proceed.

Ad Rienks [email protected] schrieb am Fr., 27. Mai 2016 um 09:59
Uhr:

Op vrijdag 27 mei 2016 10:03:51 UTC+2 schreef Norbert M.:

If you are able to, do an upgrade. If you can’t just ignore the warning…
In any case, it is not related to the remaining message you screenshotted
instead of copy pasting… Just read along after the warning lines and take a
closer look at the actual error, it gives you very good hints on how to
proceed.

Norbert,

Thank you; you are right that copy / pasting is better. I will paste the
text here underneath.
What I see is “rake aborted!”. I guess that is the real error.
But what to do? Shall I do ‘rake db:migrate’? But in this chapter of
the
tutorial there is no database implemented; not yet! I don’t understand
it?
The funny thing is: the ‘sample_app’ application is running without
problems, as far as I can see!

Here the pasted screen lines:

kwibus:~/workspace $ cd sample_app
kwibus:~/workspace/sample_app (filling-in-layout) $ bundle exec rake
test
RubyDep: WARNING: Your Ruby is outdated/buggy. (To disable warnings, set
RUBY_DEP_GEM_SILENCE_WARNINGS=1)
RubyDep: WARNING: Your Ruby is: 2.3.0 (buggy). Recommendation: install
2.3.1.
RubyDep: WARNING: Your Ruby is outdated/buggy. (To disable warnings, set
RUBY_DEP_GEM_SILENCE_WARNINGS=1)
RubyDep: WARNING: Your Ruby is: 2.3.0 (buggy). Recommendation: install
2.3.1.
/home/ubuntu/workspace/sample_app/db/schema.rb doesn’t exist yet. Run
rake db:migrate to create it, then try again. If you do not intend to use a
database, you should instead alter
/home/ubuntu/workspace/sample_app/config/application.rb to limit the
frameworks that will be loaded.
rake aborted!
NoMethodError: undefined method use' for Minitest::Reporter:Class /home/ubuntu/workspace/sample_app/test/test_helper.rb:5:in<top
(required)>’
/home/ubuntu/workspace/sample_app/test/controllers/static_pages_controller_test.rb:1:in
require' /home/ubuntu/workspace/sample_app/test/controllers/static_pages_controller_test.rb:1:in<top (required)>’
/usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.2/lib/rails/test_unit/sub_test_task.rb:114:in
require' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.2/lib/rails/test_unit/sub_test_task.rb:114:inblock (3 levels) in define’
/usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.2/lib/rails/test_unit/sub_test_task.rb:114:in
each' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.2/lib/rails/test_unit/sub_test_task.rb:114:inblock (2 levels) in define’
/usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.2/lib/rails/test_unit/sub_test_task.rb:113:in
each' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.2/lib/rails/test_unit/sub_test_task.rb:113:inblock in define’
/usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.2/lib/rails/test_unit/sub_test_task.rb:20:in
invoke_rake_task' /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.2/lib/rails/test_unit/testing.rake:8:inblock in <top (required)>’
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/cli/exec.rb:63:in
load' /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/cli/exec.rb:63:inkernel_load’
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/cli/exec.rb:24:in
run' /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/cli.rb:304:inexec’
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in
run' /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:ininvoke_command’
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/vendor/thor/lib/thor.rb:359:in
dispatch' /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/vendor/thor/lib/thor/base.rb:440:instart’
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/cli.rb:11:in
start' /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/exe/bundle:27:inblock
in <top (required)>’
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/lib/bundler/friendly_errors.rb:98:in
with_friendly_errors' /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.12.2/exe/bundle:19:in<top
(required)>’
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in load' /usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in eval' /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in
Tasks: TOP => test:run
(See full trace by running task with --trace)

Norbert,

Thanks again!
I walked through the tutorial, rereading chapter 3, and there I found my
mistake, in this line: Minitest::Reporters.use!

After correction, the test ran without errors!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs