我有 ruby 1.9.3 和 rails 3.1
我正在尝试使用以下语法生成控制器:
$rails generate controller sessions new create failure
但是用这个错误回复我:
/Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in
load': /Users/Uriel/Documents/Uriel/omniauth/config/initializers/omniauth.rb:2: syntax error, unexpected tIDENTIFIER, expecting keyword_end (SyntaxError) from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in
block in load' 来自 /Users/Uriel/。 rvm/gems/ruby-1.9.3-head@omniauth/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:inblock in load_dependency' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in
new_constants_in' 来自 /Users/Uriel/.rvm/gems/ruby-1.9。 3-head@omniauth/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:inload_dependency' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in
load' 来自 /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/ railties-3.1.0/lib/rails/engine.rb:555:inblock (2 levels) in <class:Engine>' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/engine.rb:554:in
each' 来自 /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/ rails/engine.rb:554:inblock in <class:Engine>' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/initializable.rb:25:in
instance_exec' 来自 /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/initializable.rb:25:在run' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/initializable.rb:50:in
在 /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/initializable.rb:49:in run_initializers' 中阻止each' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/initializable.rb:49:in
/Users/中的 run_initializers' Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/application.rb:92:ininitialize!' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in
method_missing' 来自 /Users/Uriel/Documents/Uriel/omniauth/ config/environment.rb:5:in<top (required)>' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/application.rb:78:in
require' 来自 /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/application.rb:78:在require_environment!' from /Users/Uriel/.rvm/gems/ruby-1.9.3-head@omniauth/gems/railties-3.1.0/lib/rails/commands.rb:22:in
'来自脚本/rails:6:inrequire' from script/rails:6:in
'
谢谢!:)