Reputation: 65
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?
Upvotes: 6
Views: 11538
Reputation: 18834
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
Upvotes: 6
Reputation: 1318
Do you have more than one version of ruby on your machine? If so download rvm, use rvm --default
to set a default ruby version, then check if you have all the needed dependencies (i.e. gems) associated with your default version of ruby. If not, then reinstall rails and the missing gems.
Upvotes: 1
Reputation: 1629
If you install a new gem don't forget to bundle install
and start your server again.
Upvotes: 2
Reputation: 139
I'm not sure, but you have to try re-install Rails.
Try sudo gem install rails
.
Upvotes: 1
Reputation: 13181
Try:
bundle install
Then start your server with this command:
bundle exec rails s
Upvotes: 10