我一直试图让这个介绍工作:
http://guides.rubyonrails.org/getting_started.html
当我尝试这一步'rails generate scaffold Post name:string title:string content:text'时,我得到以下信息:
Cerberus:app lab49$ rails generate scaffold 帖子名称:字符串标题:字符串内容:文本调用 active_record /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.6/lib/active_record/connection_adapters /abstract/connection_specification.rb:66:in
connection_url_to_hash': undefined method
sub' for nil:NilClass (NoMethodError) from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.6/lib/active_record/connection_adapters /abstract/connection_specification.rb:34:inblock in resolve_string_connection' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord->3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:33:in
fetch'
我在 Mac OS X Lion 10.7.4 上使用 ruby-1.9.3-p194 和 rails 3.2.6。
在过去的几天里,我一直在互联网上寻找解决方案。我取得的唯一进展是降级到 rails 3.1.6,但这会引入保存模型的错误。
任何帮助将非常感激。