简体   繁体   中英

Geting error in Terminal after trying Rails server

I'm trying to run server in Ubuntu Terminal by "$rails server", and i get this error in terminal:

" /home/sergei/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in require': cannot load such file -- rails/cli (LoadError) from /home/sergei/.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in require' from /usr/bin/rails:7:in `' ".

Ruby and Rails installed. Who knows how I can resolve that? Thanks!

Check if you have two ruby versions. Please paste the output of following command:

$ which -a ruby

If you more than one than leave one and remove others.

  1. Remove ruby version installed via ports (yum or whatever package manager).
  2. Remove ruby version that came with OS (hardcore rm by hand).
  3. Install ruby version from ports with different prefix (/usr instead of /usr/local)
  4. Reinstall rubygems

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