使用Rails教程;我通过运行'rails console'进入Rails控制台模式,或者说是开发模式。我正在关注Hartl的精彩教程,我接受了:
NoMethodError: undefined method `empty?' for nil:NilClass
from (irb):7
from /Users/coreymkimball/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/commands/console.rb:90:in `start'
from /Users/coreymkimball/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/commands/console.rb:9:in `start'
from /Users/coreymkimball/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/commands.rb:64:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
当我跑:'nil.empty?'
在Hartl的教程中,它显示了在运行命令后显示的内容:
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.empty?
我的问题是,我的目录和不同的文件夹(它看起来像什么)的所有附加细节是什么?
学习Rails,感谢您的提示。