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

Support rails/rails#13886 by chainging select_rows arguments #415

Merged
merged 1 commit into from Feb 10, 2014

Conversation

yahonda
Copy link
Collaborator

@yahonda yahonda commented Feb 10, 2014

This pull request addresses a failure #414.

This pull request still needs some work to fix the following error. Will open another pull request when it is ready.

$ ARCONN=oracle ruby -Itest test/cases/adapter_test.rb -n test_select_methods_passing_a_association_relation
Using oracle
Run options: -n test_select_methods_passing_a_association_relation --seed 6610

# Running:

E

Finished in 0.169629s, 5.8952 runs/s, 23.5809 assertions/s.

  1) Error:
ActiveRecord::AdapterTest#test_select_methods_passing_a_association_relation:
ActiveRecord::StatementInvalid: OCIError: ORA-01008: not all variables bound: SELECT "POSTS"."TITLE" FROM "POSTS"  WHERE "POSTS"."AUTHOR_ID" = :a1
    stmt.c:230:in oci8lib_210.so
    /home/yahonda/.rvm/gems/ruby-2.1.0@railsmaster/gems/ruby-oci8-2.1.7/lib/oci8/cursor.rb:126:in `exec'
    /home/yahonda/.rvm/gems/ruby-2.1.0@railsmaster/gems/ruby-oci8-2.1.7/lib/oci8/oci8.rb:278:in `exec_internal'
    /home/yahonda/.rvm/gems/ruby-2.1.0@railsmaster/gems/ruby-oci8-2.1.7/lib/oci8/oci8.rb:269:in `exec'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:429:in `exec'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:180:in `select'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:808:in `block in select_rows'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:373:in `block in log'
    /home/yahonda/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:367:in `log'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1500:in `log'
    /home/yahonda/git/oracle-enhanced/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:807:in `select_rows'
    /home/yahonda/git/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:54:in `select_values'
    test/cases/adapter_test.rb:192:in `test_select_methods_passing_a_association_relation'

1 runs, 4 assertions, 0 failures, 1 errors, 0 skips
$

yahonda added a commit that referenced this pull request Feb 10, 2014
Support rails/rails#13886 by chainging select_rows arguments
@yahonda yahonda merged commit 36e1949 into rsim:master Feb 10, 2014
@yahonda yahonda deleted the rails_13886 branch May 27, 2014 20:58
@lustremedia
Copy link

What version was affected by this? I just ran into a similar issue when calling ".save" on an ActiveRecord::Base object. All it spouted out was "wrong number of arguments (3 for 1..2)" on rails 4

I then had version 1.5.2 still in my gemset. Updating to 1.5.5 made the error go away.

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

Successfully merging this pull request may close these issues.

None yet

2 participants