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

arel 2.1.5 and rails 3.1.0.rc4/5 error #72

Closed
cipater opened this Issue Aug 9, 2011 · 12 comments

Comments

Projects
None yet
8 participants
@cipater

cipater commented Aug 9, 2011

receiving the following error with arel 2.1.5 and rails 3.1 rc4 and rc5. downgrading to arel 2.1.4 resolves the error.

NoMethodError: undefined method `visitor' for #<ActiveRecord::ConnectionAdapters::Mysql2Adapter:0x000001048b4c50>
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/arel-2.1.5/lib/arel/tree_manager.rb:19:in `visitor'
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/arel-2.1.5/lib/arel/tree_manager.rb:23:in `to_sql'
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/activerecord-3.1.0.rc5/lib/active_record/relation.rb:111:in `to_a'
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/activerecord-3.1.0.rc5/lib/active_record/relation/finder_methods.rb:370:in `find_first'
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/activerecord-3.1.0.rc5/lib/active_record/relation/finder_methods.rb:122:in `first'
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/activerecord-3.1.0.rc5/lib/active_record/base.rb:437:in `first'
    from (irb):2
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/railties-3.1.0.rc5/lib/rails/commands/console.rb:45:in `start'
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/railties-3.1.0.rc5/lib/rails/commands/console.rb:8:in `start'
    from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/railties-3.1.0.rc5/lib/rails/commands.rb:40:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
@heronmedeiros

This comment has been minimized.

Show comment
Hide comment
@heronmedeiros

heronmedeiros Aug 9, 2011

Put in your Gemfile :
gem "arel", "2.1.4"

should works.

heronmedeiros commented Aug 9, 2011

Put in your Gemfile :
gem "arel", "2.1.4"

should works.

@heronmedeiros

This comment has been minimized.

Show comment
Hide comment
@heronmedeiros

heronmedeiros Aug 9, 2011

and run :

bundle update arel

heronmedeiros commented Aug 9, 2011

and run :

bundle update arel

@cipater

This comment has been minimized.

Show comment
Hide comment
@cipater

cipater Aug 9, 2011

downgrading to arel 2.1.4 resolves the error

yup. had figured that out... was just reporting the error.

cipater commented Aug 9, 2011

downgrading to arel 2.1.4 resolves the error

yup. had figured that out... was just reporting the error.

@marcandre

This comment has been minimized.

Show comment
Hide comment
@marcandre

marcandre Aug 9, 2011

Same error with Postgres adapter, BTW. Show stopper on Heroku. I'm curious to know how this was not caught by tests, as most DB operations fail this way.

marcandre commented Aug 9, 2011

Same error with Postgres adapter, BTW. Show stopper on Heroku. I'm curious to know how this was not caught by tests, as most DB operations fail this way.

@llb0536

This comment has been minimized.

Show comment
Hide comment
@llb0536

llb0536 Aug 9, 2011

same problem...waste my whole day.....

llb0536 commented Aug 9, 2011

same problem...waste my whole day.....

@llb0536

This comment has been minimized.

Show comment
Hide comment
@llb0536

llb0536 Aug 9, 2011

thanks heronmedeiros~~
you had saved my day

llb0536 commented Aug 9, 2011

thanks heronmedeiros~~
you had saved my day

@mvj3

This comment has been minimized.

Show comment
Hide comment
@mvj3

mvj3 Aug 9, 2011

thx heronmedeiros, it works~

mvj3 commented Aug 9, 2011

thx heronmedeiros, it works~

@sunaku

This comment has been minimized.

Show comment
Hide comment
@sunaku

sunaku Aug 9, 2011

Although downgrading to ARel 2.1.4 fixes the "undefined method visitor" error, it exposes a new error when using SQLite3:

Failure/Error: wrkt = FactoryGirl.build(:workout)
     ActiveRecord::StatementInvalid:
       SQLite3::ConstraintException: constraint failed: 
        INSERT INTO "performed_sets" ("created_at", "notes", "performed_exercise_id", "reps", "set_number", "updated_at", "weight") 
        VALUES (?, ?, ?, ?, ?, ?, ?)

Any tips on how to monkeypatch ARel 2.1.5 to play nicely with Rails 3.1.0rc5 libraries? Thanks.

sunaku commented Aug 9, 2011

Although downgrading to ARel 2.1.4 fixes the "undefined method visitor" error, it exposes a new error when using SQLite3:

Failure/Error: wrkt = FactoryGirl.build(:workout)
     ActiveRecord::StatementInvalid:
       SQLite3::ConstraintException: constraint failed: 
        INSERT INTO "performed_sets" ("created_at", "notes", "performed_exercise_id", "reps", "set_number", "updated_at", "weight") 
        VALUES (?, ?, ?, ?, ?, ?, ?)

Any tips on how to monkeypatch ARel 2.1.5 to play nicely with Rails 3.1.0rc5 libraries? Thanks.

@tenderlove

This comment has been minimized.

Show comment
Hide comment
@tenderlove

tenderlove Aug 9, 2011

Member

2.1.5 is yanked, please use 2.1.4.

Member

tenderlove commented Aug 9, 2011

2.1.5 is yanked, please use 2.1.4.

@tenderlove tenderlove closed this Aug 9, 2011

@tenderlove

This comment has been minimized.

Show comment
Hide comment
@tenderlove

tenderlove Aug 9, 2011

Member

I've pulled 2.1.5

Member

tenderlove commented Aug 9, 2011

I've pulled 2.1.5

@stevenzeiler

This comment has been minimized.

Show comment
Hide comment
@stevenzeiler

stevenzeiler Aug 24, 2011

Same error with arel 2.1.4 and rails 3.1.0.rc4, even though arel 2.1.5 was never installed.

NoMethodError (undefined method `visitor' for #ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x2577298):

stevenzeiler commented Aug 24, 2011

Same error with arel 2.1.4 and rails 3.1.0.rc4, even though arel 2.1.5 was never installed.

NoMethodError (undefined method `visitor' for #ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x2577298):

@sunaku

This comment has been minimized.

Show comment
Hide comment
@sunaku

sunaku Sep 21, 2011

This error does not occur in the Rails 3.1.0 release. :)

sunaku commented Sep 21, 2011

This error does not occur in the Rails 3.1.0 release. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment