与Devise的循环参数引用

时间:2016-08-06 16:55:23

标签: ruby-on-rails devise

我正在尝试在我的rails项目中运行命令rails g devise:install,但它无效。这里有更多信息。

/Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/Users/Sam/Documents/workspace/cc1/config/environments/development.rb:1:in `<top (required)>': undefined method `configure' for #<Cc1::Application:0x007fb2b25cee98> (NoMethodError)
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/engine.rb:590:in `each'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/engine.rb:590:in `block in <class:Engine>'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `each'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `tsort_each_child'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `call'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
    from /Users/Sam/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
    from /Users/Sam/Documents/workspace/cc1/config/environment.rb:5:in `<top (required)>'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
    from /Users/Sam/.rvm/gems/ruby-2.2.2/gems/railties-4.0.0/lib/rails/commands.rb:45:in `<top (required)>'
    from bin/rails:9:in `require'
    from bin/rails:9:in `<main>'

更多信息:

Ruby Version: 2.2.2

Rails Version: 4.0.0

Gemfile:

source 'https://rubygems.org'
ruby "2.2.2"

gem 'rails', '4.0.0'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass', '~> 3.0.3.0'
gem "paperclip", "~> 3.0"
gem "paperclip-dropbox", ">= 1.1.7"
gem "figaro"
gem 'devise'

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

group :development, :test do
  gem 'sqlite3'
end

group :doc do
  gem 'sdoc', require: false
end

我猜这不是一个设计问题。请让我知道发生了什么。我已经尝试过运行bundle install和bundle update,这些传递得很好。

1 个答案:

答案 0 :(得分:1)

问题在于ActiveSupport prior to Rails 4.1.9。升级您的Rails version,您应该保持良好状态。