I have been using these files all day… And then suddenly this is now what I get.
#!/Users/user969617/.rvm/gems/ruby-1.9.3-p0
puts "hello world"
require 'json'
output:
hello world
rub.rb:3:in `require': no such file to load -- json (LoadError)
from rub.rb:3
I can call it from the interactive ruby shell though… super strange.
Using /Users/user969617/.rvm/gems/ruby-1.9.3-p0
1.9.3p0 :001 > require 'json'
=> true
1.9.3p0 :002 >
Any ideas? I have restarted the computer 😉
—————— update
I dont use any other require functions, but I just tried require ‘Rake’ which also returns True in irb, but go the same ‘no such file to load’… so it’s any require request it seems
You need to bootstrap RVM in your environment. Run this to add the bootstrapping code to your environment.
If that doesn’t fix it, make sure that you have it installed with your current gemset (RVM supports sets of gems which get added and removed from the environment)
gem list jsonIf you don’t have it, thengem install json