完成 Rails 教程;通过运行“rails 控制台”,我处于 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,感谢您的提示。