所以我正在尝试启动rails服务器,我收到以下错误:
嘿伙计们,我试图用rails s启动服务器,我收到了这个错误:
ldco2016@DCortes-MacBook-Pro-3 ~/Projects/blog_app (master)$ rails s [ruby-2.2.0]
/Users/ldco2016/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'railties' (>= 0.a) among 14 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/ldco2016/.rvm/gems/ruby-2.2.0:/Users/ldco2016/.rvm/gems/ruby-2.2.0@global', execute `gem env` for more information
from /Users/ldco2016/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/ldco2016/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /usr/local/bin/rails:22:in `<main>'
我尝试更改ruby版本,但我不确定这里发生了什么。
所以我已经完成了捆绑exec和捆绑exec rails s并且我重新安装了ruby-2.2.5但仍未解决。
答案 0 :(得分:0)
您的Rails安装似乎已损坏或者可能没有安装Rails。运行此命令,看看是否安装了任何版本的Rails:
$ gem list
如果没有Rails,您可以通过运行:
轻松安装它$ gem install rails