当前位置: 动力学知识库 > 问答 > 编程问答 >

warning: circular argument reference - now when trying to open rails console

问题描述:

Whenever I type in rails console in the root of the application I get this:

/Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now

/Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- test/unit/testcase (LoadError)

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/test_case.rb:1:in `<top (required)>'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/console/app.rb:2:in `<top (required)>'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/application.rb:304:in `initialize_console'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/application.rb:152:in `load_console'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/commands/console.rb:27:in `start'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'

from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>'

from script/rails:6:in `require'

from script/rails:6:in `<main>'

Any way to stop this from happening, so I can use the rails console. I'm on rails version 3.2.13.

网友答案:

I had the same issue. It has been caused by wrong access rights to the gem files. The gems have been owned by the wrong user.

This resolved the issue for me:

  1. Setting the correct user recursively: chown -R user folder.
  2. Reinstalling the necessary gems (optional. I did this just to make sure, I didn't break something)

Unfortunately, I'm not using. Thus, I can't give you detailed instructions how to do this for rvm.

分享给朋友:
您可能感兴趣的文章:
随机阅读: