0

Ruby/Rails 太混乱了。我正在阅读 Michael Hartl 教程,但使用以下终端命令时出现错误:

$  rails generate scaffold Micropost content:string user_id:integer

给我:

/Users/johncurry/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'railties' (>= 0) among 8 total gem(s) (Gem::LoadError)
from /Users/johncurry/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:309:in `to_spec'
from /Users/johncurry/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/johncurry/.rvm/rubies/ruby-2.0.0-p247/bin/rails:22:in `<main>'

我真的不知道它在问什么,或者为什么它不起作用。我之前能够生成一个脚手架,并且我在终端的 demo_app 文件夹中,所以我不确定发生了什么,甚至不知道这里放什么信息。http://ruby.railstutorial.org/chapters/a-demo-app#fig-demo_micropost_model 是链接,我被困在第 2.3.1 节

$bundle show
/Users/johncurry/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'bundler' (>= 0) among 8 total gem(s) (Gem::LoadError)
from /Users/johncurry/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:309:in `to_spec'
from /Users/johncurry/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/johncurry/.rvm/rubies/ruby-2.0.0-p247/bin/bundle:22:in `<main>'
4

0 回答 0