简体   繁体   中英

`require': cannot load such file on running rails --help on brand new install

This is getting quite frustrating. I've eventually resorted to completely removing RVM, and reinstalling from scratch, as a normal user, so restricted to my /home.

After reinstall, I've run gem update --system and gem install rails.

Then I run rails --help, and get the following error:

rails --help
/home/anthony/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- /home/anthony/config/boot (LoadError)
    from /home/anthony/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from script/rails:5:in `<main>'

Apparently rails thinks it should be loading a file /home/anthony/config/boot. It looks like the load path is screwed.

I've searched this out, and most people getting this error solve it with gem update --system (which I've one as above), or can at lest run rails -- or rails new . None of these work.

Final System info:

https://gist.github.com/1424644

Please help!

This may be totally a red herring, but it looks like your rails is in a different gemset - "campingground" - than either gem or ruby , which are in your default gemset. I'm not sure if this will cause the issue you're seeing or not - I believe it's OK if you're using the campingground gemset rvm use ruby-1.9.3-p0@campingground , but not if you're using the default gemset rvm use ruby-1.9.3-p0 because I believe that gemsets all inherit the default gemset, but not vice versa. I've had some issues with the bin launchers of ruby helpers (like the rails command) barfing all sorts of confusing load errors, which are often this very issue. Again, not sure if helpful, but I'd share that shot in the dark.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM