Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get "Could not find 'railties' error with Rails server?

When I start my Rails server using rails s, I getting 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 do I fix it?

like image 485
Ghayathri Avatar asked Apr 08 '13 05:04

Ghayathri


3 Answers

Try:

bundle install

Then start your server with this command:

bundle exec rails s
like image 69
Benj Avatar answered Nov 02 '22 10:11

Benj


There might be something wrong with your rails install. Try gem list, if you don't see railties then re-install rails: gem install rails

like image 6
Connor Leech Avatar answered Nov 02 '22 09:11

Connor Leech


If you install a new gem don't forget to bundle install and start your server again.

like image 2
Lian Avatar answered Nov 02 '22 08:11

Lian