我尝试执行以下命令:
rails generate scaffold Micropost content:string user id:integer
执行以下命令后,出现以下错误消息:
/usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (>= 0) among 13 total gem(s) (Gem::LoadError)
from /usr/local/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/local/bin/rails:22:in `<main>'
但在此之前,我已经执行了另一个这样的语句来创建一个名为 User 的资源。这运行成功。我是 Rails 的新手。我不知道这个错误。谁能帮我解决这个问题?谢谢你。