Hello there I am new to rail. I am following railstutorial.org by Michael Hartl. I am stuck in chapter 4, Listing 4.5:
when i hit
$ bundle exec rake test
$ bundle exec rake test
RubyDep: WARNING: your Ruby has security vulnerabilities! Please upgrade! (To disable warnings, set RUBY_DEP_GEM_SILENCE_WARNINGS=1)
/home/shyambhimani/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-reporters-1.0.5/lib/minitest/minitest_reporter_plugin.rb:8:in `block in plugin_minitest_reporter_init': undefined method `add_defaults' for #<Guard::Minitest::Reporter:0x005580a1496930> (NoMethodError)
from /home/shyambhimani/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-reporters-1.0.5/lib/minitest/minitest_reporter_plugin.rb:6:in `each'
from /home/shyambhimani/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-reporters-1.0.5/lib/minitest/minitest_reporter_plugin.rb:6:in `plugin_minitest_reporter_init'
from /home/shyambhimani/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:74:in `block in init_plugins'
from /home/shyambhimani/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:72:in `each'
from /home/shyambhimani/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:72:in `init_plugins'
from /home/shyambhimani/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:123:in `run'
from /home/shyambhimani/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.8.4/lib/minitest.rb:56:in `block in autorun'
<title><%= full_title(yield(:title)) %></title>
<%= stylesheet_link_tag 'application', media: 'all',
'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
<%= yield %>
# Returns the full title on a per-page basis.
def full_title(page_title = '')
base_title = "Ruby on Rails Tutorial Sample App"
page_title + " | " + base_title
class StaticPagesControllerTest < ActionController::TestCase
test "should get home" do
assert_select "title", "Ruby on Rails Tutorial Sample App"
test "should get help" do
assert_select "title", "Help | Ruby on Rails Tutorial Sample App"
test "should get about" do
assert_select "title", "About | Ruby on Rails Tutorial Sample App"
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical
# Add more helper methods to be used by all tests here...
It seems like you are using RubyDep, a tool that helps you to avoid insecure Ruby versions. RubyDep tells you in the first line:
RubyDep: WARNING: your Ruby has security vulnerabilities! Please upgrade! (...)
Looking at the path (
.../.rbenv/versions/2.2.3/...) of the other lines of the stacktrace it looks like you are using Ruby version 2.2.3, installed with rbenv.
And RubyDep is right: There is a known vulnerability in Ruby
There are newer versions of Ruby available. You could upgrade to the latest
2.2.x version (or the latest
2.3.x). I suggest to upgrade to
2.2.5, because I'm do not know if the tutorial is compatible with
To upgrade Ruby to a newer version with
rbenv follow this steps (I suppose you used
brew to install
brew update # update to the latest brew version brew upgrade ruby-build # update Ruby version library brew upgrade rbenv # update rbenv rbenv install 2.2.5 # install Ruby 2.2.5
Set 2.2.5 to you default Ruby version:
rbenv global 2.2.5
Update your Rails application to use this Ruby version. To do so check the following files (if they exist, they might be hidden) and change the Ruby version in that files:
You might want to check in your applications root that you are using the updated version of Ruby:
ruby -v # should return `ruby 2.2.5p...`
Last step is to reinstall gems:
gem install bundler bundler install
Was the update successful?
bundle exec rake test