Why am I getting the message "Could not find railties" with the Rails server?

When I start my Rails server using rails s, I get this error:

/usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (>= 0) among 10 total gem(s) (Gem::LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:307:in `to_spec'
from /usr/local/lib/site_ruby/1.8/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/bin/rails:22

How to fix it?

+5
source share
5 answers

Try:

bundle install

Then start your server with this command:

bundle exec rails s
+8
source

Maybe something is wrong with your rails. Try gem listit if you do not see railties, then reinstall the rails:gem install rails

+6
source

, bundle install .

+2

, Rails.

sudo gem install rails.

+1

Do you have several versions of ruby ​​on your computer? If you download rvm, use rvm --defaultto install the standard ruby ​​version, then check if you have all the necessary dependencies (like gems) associated with your ruby ​​by default. If not, reinstall the rails and missing gems.

+1
source

All Articles