每当我在应用程序的根目录中输入rails console
时,我都会得到:
/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>'
任何阻止这种情况发生的方法,所以我可以使用rails控制台。我在rails 3.2.13版本上。
答案 0 :(得分:0)
我有同样的问题。它是由对gem文件的错误访问权限引起的。宝石由错误的用户拥有。
这解决了我的问题:
chown -R user folder
。不幸的是,我没有使用。因此,我无法向您详细说明如何为rvm执行此操作。