1
我有一些麻煩與我的Rails環境破 - 就像運行一個命令:軌生成NoMethodError
$ rails generate scaffold_controller model_name
結果如下跟蹤:
/Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/generators/generated_attribute.rb:13:in `parse': undefined method `split' for :clear:Symbol (NoMethodError)
from /Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/generators/named_base.rb:161:in `block in parse_attributes!'
from /Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/generators/named_base.rb:160:in `map'
from /Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/generators/named_base.rb:160:in `parse_attributes!'
from /Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/generators/named_base.rb:21:in `initialize'
from /Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/generators/resource_helpers.rb:18:in `initialize'
from /Users/me/.rvm/gems/[email protected]/gems/thor-0.18.1/lib/thor/group.rb:227:in `new'
from /Users/me/.rvm/gems/[email protected]/gems/thor-0.18.1/lib/thor/group.rb:227:in `dispatch'
from /Users/me/.rvm/gems/[email protected]/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/generators.rb:171:in `invoke'
from /Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/commands/generate.rb:12:in `<top (required)>'
from /Users/me/.rvm/gems/[email protected]/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/me/.rvm/gems/[email protected]/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/me/.rvm/gems/[email protected]/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/me/.rvm/gems/[email protected]/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/me/.rvm/gems/[email protected]/gems/railties-3.2.13/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
如無物的痕跡似乎即使是來自我的具體項目,我對於可能發生的事情有點難以理解。正如你所看到的,我在運行rvm的ruby 1.9.3上運行rails 3.2.13。
任何想法?
我得到了使用Rails 4.0.0和Zeus運行生成器的錯誤。我已經定製了我的發生器(默認情況下關閉helpers/stylesheets/javascripts),但所有漂亮的香草。你有沒有解決這個問題? – Leo
不幸的是,我剛剛通過避免受到影響的發電機來解決這個問題...... – drosboro
好啊。下週我會花一點時間看看它。我會發布我在這裏找到的任何有用信息。 – Leo