为什么我在rails上得到NoM​​ethodError生成figaro:install

时间:2014-12-18 08:47:49

标签: ruby-on-rails

我正在尝试运行以下命令..

rails生成figaro:install

我收到以下错误。我是rails的新手,所以事情有点慢。感谢您的投入。


/Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/google-api-client-0.8.0/lib/google/api_client/railtie.rb:13:in `block in <class:Railtie>': undefined method `logger' for #<LearnRails::Application:0x007fbaca582280> (NoMethodError)
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/initializable.rb:30:in `run'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `call'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
    from /Users/marauf/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/application.rb:300:in `initialize!'
    from /Users/marauf/Rails_Projects/learn-rails/config/environment.rb:5:in `<top (required)>'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `block in require'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/activesupport-4.1.8/lib/active_support/dependencies.rb:247:in `require'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/application.rb:276:in `require_environment!'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:147:in `require_application_and_environment!'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:133:in `generate_or_destroy'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:51:in `generate'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/marauf/.rvm/gems/ruby-2.1.5@learn-rails/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:8:in `require'
    from bin/rails:8:in `<main>'

1 个答案:

答案 0 :(得分:0)

解决。

将google-api-client gem更新为0.8.1。我在ruby 2.1.5和rails 4.1.8。