Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 2.3.11: Allocate breaks IRB #1294

Closed
beatrichartz opened this issue May 25, 2011 · 7 comments
Closed

Rails 2.3.11: Allocate breaks IRB #1294

beatrichartz opened this issue May 25, 2011 · 7 comments

Comments

@beatrichartz
Copy link

Hey Guys

In IRB when trying to call allocate on an activerecord object, there's an error: "NoMethodError: undefined method `has_key?' for nil:NilClass"

from /Users/beatrichartz/.rvm/gems/ree-1.8.7-2011.03@restorm-com/gems/activesupport-2.3.11/lib/active_support/whiny_nil.rb:52:in `method_missing'
from /Users/beatrichartz/.rvm/gems/ree-1.8.7-2011.03@restorm-com/gems/activerecord-2.3.11/lib/active_record/base.rb:2839:in `has_attribute?'
from /Users/beatrichartz/.rvm/gems/ree-1.8.7-2011.03@restorm-com/gems/activerecord-2.3.11/lib/active_record/base.rb:2900:in `inspect'
from /Users/beatrichartz/.rvm/gems/ree-1.8.7-2011.03@restorm-com/gems/activerecord-2.3.11/lib/active_record/base.rb:2899:in `collect'
from /Users/beatrichartz/.rvm/gems/ree-1.8.7-2011.03@restorm-com/gems/activerecord-2.3.11/lib/active_record/base.rb:2899:in `inspect'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:310:in `output_value'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:159:in `eval_input'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:155:in `eval_input'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:71:in `start'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:70:in `catch'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:70:in `start'
from /Users/beatrichartz/.rvm/rubies/ree-1.8.7-2011.03/bin/irb:17

May be you want to fix that

Cheers

@dmathieu
Copy link
Contributor

Do you have a failing test case ? Something more explicit than just a failing backtrace.

@beatrichartz
Copy link
Author

Try to run

class Something < ActiveRecord::Base
end

Something.allocate

(there is a table named 'somethings' needed, too)

in IRB

@dmathieu
Copy link
Contributor

Happens in 3.0 too.

@caseydreier
Copy link

Can this be pulled into Rails 2.3-stable as well?

@josevalim
Copy link
Contributor

Rails 2.3 is no longer maintained now that Rails 3.1 is out. Upgrading is recommended.

@caseydreier
Copy link

That was fast. Any chance of final a maintenance release that encompasses that last few patches?

@josevalim
Copy link
Contributor

I don't think so.

jake3030 pushed a commit to jake3030/rails that referenced this issue Jun 28, 2011
[rails#1294 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
jake3030 pushed a commit to jake3030/rails that referenced this issue Jun 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants