简体   繁体   中英

'require': no such file to load — rails/cli (LoadError)

when I uninstalled bundler 1.6.2 to use 1.0.0 rails crashed. I tried this command:

gem uninstall -i /home/mayukh/.rvm/gems/ruby-1.9.2-p320@global bundler -v=1.6.2

Please note, I have uninstalled this globally

Now, when I run rails -v or rails s it shows error like this:

<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- rails/cli (LoadError)
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/bin/rails:7:in `<main>'

My ruby version is ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux]

  1. Is it the right way to use/uninstall bundler? or is there any way to switch between bundlers?
  2. How to fix this issue and run rails again?

Uninstall bundle might not be the better solution. If you want to force the bundle version to install something try this (as said in this post ) :

bundle _1.0.0_ install

But for you current problem, you should do what tadman said. Uninstall all bundle instances and get the lastest one to force the version after.

Hope this help !

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