Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

whiny_nil causes crash on Ruby 1.9.1 p378 using RVM

#4105

Get this error when trying to script/rails anything:

.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/whiny_nil.rb:29:in <class:NilClass>': uninitialized constant ActiveRecord::Base (NameError) from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/whiny_nil.rb:27:in'

Replicate by:

rails error_app --skip-activerecord
cd error_app
(edit Gemfile to bundle edge rails from git) bundle install
script/rails console

It appears to only happen on ruby 1.9.1. I'm using rvm for my ruby versioning.

Changing:
WHINERS << ::ActiveRecord::Base if defined? ::ActiveRecord

To:
WHINERS << ::ActiveRecord::Base if defined? ::ActiveRecord::Base

Fixes the problem.

Reported by DavidBackeus · March 4th, 2010 @ 11:16 AM

State: duplicate
Milestone: 3.0.2
Assigned to: Carl Lerche Carl Lerche
Importance: Low

Activity

  1. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to open
    • Assigned user set to Carl Lerche
    • Milestone cleared.

    March 4th, 2010 @ 05:28 PM

  2. windock
    windock
    • Tag changed from activesupport, rails3 to activesupport, duplicate, rails3

    March 4th, 2010 @ 05:35 PM

  3. José Valim
    José Valim
    • State changed from open to duplicate

    March 26th, 2010 @ 10:48 PM

  4. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM