3

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.

vgoff
  • 10,980
  • 3
  • 38
  • 56
Justin Lee
  • 63
  • 5
  • Could you specify what it is you're entering in the console? – Jan Jul 05 '15 at 21:02
  • You type in `rails console` in the root of what? – vgoff Jul 05 '15 at 21:05
  • I'm in the root of the application im building for this rails tutorial. Sorry, I'm just learning this language; I should've specified. – Justin Lee Jul 05 '15 at 21:07
  • https://www.ruby-forum.com/topic/6873211 is what I found doing a search for that error. Look through that discussion, it may help. Let us know! The other references I found seem to point to Compass. What is the tutorial you are going through? You say 'this tutorial" but I did not see where you were pointing. – vgoff Jul 05 '15 at 21:16
  • http://stackoverflow.com/q/27717309/485864 may be that this is a duplicate question. – vgoff Jul 05 '15 at 21:20
  • Im going through Kevin Skoglund's Ruby on Rails 3 Essential Training. I'm learning about ActiveRecord and working in the Rails console, but I can't seem to access the console. Thanks for the help. I'll let you know if I figure something out. – Justin Lee Jul 05 '15 at 22:20
  • @JustinLee BTW, Lynda.com has released Ruby on Rails 4 Essential Training, why go for version 3? – Arslan Ali Jul 05 '15 at 22:31
  • The "circular argument reference" warning is probably unrelated to the errors - it seems to be caused by using Ruby 2.2 with old Gems that have functions like `def foo(bar = bar)` (it seems to have been a common "convention") - see also https://stackoverflow.com/a/28770015/446106 – mwfearnley Nov 06 '19 at 11:44

1 Answers1

0

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.

fiedl
  • 5,667
  • 4
  • 44
  • 57