Reputation: 16051
After installing Ruby 2.0, I try and run my .rb file, and get this error:
/Users/Andrew/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require': cannot load such file -- ruby-box (LoadError)
from /Users/Andrew/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require'
from box.rb:2:in `<main>'
My code:
require "rubygems"
require "ruby-box"
Upvotes: -1
Views: 402
Reputation: 189
I recommend using bundler to manage your dependencies even if it is a small project. It provides install and update tools to help mitigate these exact problems. For example, you could update all your dependencies with one command:
bundle update
The time invested learning bundler will quickly pay for itself :D
Upvotes: 0
Reputation: 35783
Have you installed ruby-box for your new Ruby? Try running this, and trying again:
gem install ruby-box
Also note that require "rubygems"
is useless and redundant (the interpreter deals with all this for you) in Ruby 1.9 and onwards.
Upvotes: 4