0

我是 Ruby 和 Rails 的新手,在生成简单控制器时询问错误 http://writelesscode.com/blog/2012/10/20/extjs-rails-crud-application-in-7-minutes/

$ rails g controller welcome index

/Library/Ruby/Gems/1.8/gems/netzke-core-0.8.2/lib/netzke/core/railz.rb:2:inrequire': /Library/Ruby/Gems/1.8/gems/netzke-core-0.8.2/lib/netzke/core/railz/routes.rb:18: syntax error, unexpected ':', expecting kEND (SyntaxError) ...refix}/:action(.:format)", to: controller.to_s, as: 'netzke' ^ /Library/Ruby/Gems/1.8/gems/netzke-core-0.8.2/lib/netzke/core/railz/routes.rb:18: syntax error, unexpected ':', expecting '=' ...at)", to: controller.to_s, as: 'netzke' ^ from /Library/Ruby/Gems/1.8/gems/netzke-core-0.8.2/lib/netzke/core/railz.rb:2 from /Library/Ruby/Gems/1.8/gems/netzke-core-0.8.2/lib/netzke-core.rb:10:in来自/Library/Ruby/Gems/1.8/gems/netzke-core- 0.8.2/lib/netzke-core.rb:10 来自 /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:inrequire' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in来自 /Library/Ruby/ Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:ineach' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in需要来自 /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb来自/Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:128:in require'的:55:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:inrequire'require' from /Users/sparta/Work/rails/erp/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.2.12/lib/rails/commands.rb:24:in来自/Library/Ruby/Gems/1.8/gems/railties-3.2 .12/lib/rails/commands.rb:24 来自 script/rails:6:in `require' 来自 script/rails:6

也许路线有问题?我错过了什么?

4

1 回答 1

1

好像您使用的是 Ruby 1.8.7。Netzke 需要 1.9.x。

于 2013-03-13T13:27:04.860 回答