Rails 3.1 RC4 has broken migrations not only for PostgreSQL but also for MySQL. But that time the error is different. $ jruby -v jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java] $ jruby -S rails -v Rails 3.1.0.rc4 $ jruby -S rails new myapp -d jdbcpostgresql ... jruby -S rake db:create $ jruby -S rails g model user name:string invoke active_record create db/migrate/20110609233144_create_users.rb create app/models/user.rb invoke test_unit create test/unit/user_test.rb create test/fixtures/users.yml jruby -S rake db:migrate $ jruby -S rake db:migrate --trace ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:migrate == CreateUsers: migrating ===================================================-- create_table(:users) -> 0.0950s -> 0 rows == CreateUsers: migrated (0.0960s) ========================================== rake aborted! An error has occurred, this and all later migrations canceled: wrong number of arguments (3 for 2) /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- jdbc-adapter-1.1.1/lib/arjdbc/jdbc/adapter.rb:275:in `select'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ database_statements.rb:9:in `select_all'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ query_cache.rb:62:in `select_all'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ database_statements.rb:15:in `select_one'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ database_statements.rb:21:in `select_value'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:105:in `postgresql_version'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:136:in `supports_insert_with_returning?'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:247:in `insert'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/migration.rb:719:in `record_version_state_after_migrating'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/migration.rb:680:in `migrate'' org/jruby/RubyProc.java:268:in `call'' org/jruby/RubyProc.java:228:in `call'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/migration.rb:734:in `ddl_transaction'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ database_statements.rb:183:in `transaction'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/transactions.rb:208:in `transaction'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/migration.rb:734:in `ddl_transaction'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/migration.rb:678:in `migrate'' org/jruby/RubyArray.java:1602:in `each'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/migration.rb:663:in `migrate'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/migration.rb:541:in `up'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/migration.rb:522:in `migrate'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ activerecord-3.1.0.rc4/lib/active_record/railties/databases.rake: 157:in `(root)'' org/jruby/RubyProc.java:268:in `call'' org/jruby/RubyProc.java:228:in `call'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/task.rb:205:in `execute'' org/jruby/RubyArray.java:1602:in `each'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/task.rb:200:in `execute'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/task.rb:158:in `invoke_with_call_chain'' /Users/hipertracker/.rvm/rubies/jruby-1.6.2/lib/ruby/1.8/monitor.rb: 191:in `mon_synchronize'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/task.rb:151:in `invoke_with_call_chain'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/task.rb:144:in `invoke'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/application.rb:112:in `invoke_task'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/application.rb:90:in `top_level'' org/jruby/RubyArray.java:1602:in `each'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/application.rb:90:in `top_level'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/application.rb:129:in `standard_exception_handling'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/application.rb:84:in `top_level'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/application.rb:62:in `run'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/application.rb:129:in `standard_exception_handling'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ lib/rake/application.rb:59:in `run'' /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ bin/rake:32:in `(root)'' org/jruby/RubyKernel.java:1063:in `load'' /Users/hipertracker/.rvm/rubies/jruby-1.6.2/bin/rake:19:in `(root)'' Tasks: TOP => db:migrate -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Wouldn''t this be a bug in the activerecord-jdbc-adapter? - Ken On Jun 9, 2011, at 8:13 PM, hipertracker wrote:> Rails 3.1 RC4 has broken migrations not only for PostgreSQL but also > for MySQL. But that time the error is different. > > $ jruby -v > jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (Java HotSpot(TM) > 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java] > > $ jruby -S rails -v > Rails 3.1.0.rc4 > > $ jruby -S rails new myapp -d jdbcpostgresql > ... > jruby -S rake db:create > > $ jruby -S rails g model user name:string > invoke active_record > create db/migrate/20110609233144_create_users.rb > create app/models/user.rb > invoke test_unit > create test/unit/user_test.rb > create test/fixtures/users.yml > > jruby -S rake db:migrate > > $ jruby -S rake db:migrate --trace > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Invoke db:load_config (first_time) > ** Invoke rails_env (first_time) > ** Execute rails_env > ** Execute db:load_config > ** Execute db:migrate > == CreateUsers: migrating > ===================================================> -- create_table(:users) > -> 0.0950s > -> 0 rows > == CreateUsers: migrated (0.0960s) > ==========================================> > rake aborted! > An error has occurred, this and all later migrations canceled: > > wrong number of arguments (3 for 2) > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > jdbc-adapter-1.1.1/lib/arjdbc/jdbc/adapter.rb:275:in `select'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > database_statements.rb:9:in `select_all'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > query_cache.rb:62:in `select_all'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > database_statements.rb:15:in `select_one'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > database_statements.rb:21:in `select_value'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:105:in > `postgresql_version'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:136:in > `supports_insert_with_returning?'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:247:in `insert'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/migration.rb:719:in > `record_version_state_after_migrating'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/migration.rb:680:in `migrate'' > org/jruby/RubyProc.java:268:in `call'' > org/jruby/RubyProc.java:228:in `call'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/migration.rb:734:in > `ddl_transaction'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > database_statements.rb:183:in `transaction'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/transactions.rb:208:in > `transaction'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/migration.rb:734:in > `ddl_transaction'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/migration.rb:678:in `migrate'' > org/jruby/RubyArray.java:1602:in `each'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/migration.rb:663:in `migrate'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/migration.rb:541:in `up'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/migration.rb:522:in `migrate'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > activerecord-3.1.0.rc4/lib/active_record/railties/databases.rake: > 157:in `(root)'' > org/jruby/RubyProc.java:268:in `call'' > org/jruby/RubyProc.java:228:in `call'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/task.rb:205:in `execute'' > org/jruby/RubyArray.java:1602:in `each'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/task.rb:200:in `execute'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/task.rb:158:in `invoke_with_call_chain'' > /Users/hipertracker/.rvm/rubies/jruby-1.6.2/lib/ruby/1.8/monitor.rb: > 191:in `mon_synchronize'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/task.rb:151:in `invoke_with_call_chain'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/task.rb:144:in `invoke'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/application.rb:112:in `invoke_task'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/application.rb:90:in `top_level'' > org/jruby/RubyArray.java:1602:in `each'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/application.rb:90:in `top_level'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/application.rb:129:in `standard_exception_handling'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/application.rb:84:in `top_level'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/application.rb:62:in `run'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/application.rb:129:in `standard_exception_handling'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > lib/rake/application.rb:59:in `run'' > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > bin/rake:32:in `(root)'' > org/jruby/RubyKernel.java:1063:in `load'' > /Users/hipertracker/.rvm/rubies/jruby-1.6.2/bin/rake:19:in `(root)'' > Tasks: TOP => db:migrate > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Ken, I don''t think so. When I create the same application in Rails 3.0.8 migrations do not have any errors. The problem exists only for Rails 3.1 RC4. And, yes, in both situations I use the same gems versions: jdbc-mysql (5.1.13) activerecord-jdbc-adapter (1.1.1) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Ken Collins
2011-Jun-10 11:42 UTC
Re: Re: Rails 3.1 RC4 has broken migrations also for MySQL
Well and that is my point. Being an external adapter author myself, I am a witness to exactly how much the activerecord-sqlserver-adapter had to change to support the 3.1 vs 3.0 code base. I would not assume the same adapter version of anything would work 100% moving from ActiveRecord 3.0 to 3.1. Besides, just reporting problems is not enough. If have the capability some talk around what you think the problem is and even better yet some stabs at a patch would be nice. Also, have you talked to the external adapter''s author and/or community too? - Ken On Jun 10, 2011, at 3:08 AM, hipertracker wrote:> Ken, I don''t think so. When I create the same application in Rails > 3.0.8 migrations do not have any errors. The problem exists only for > Rails 3.1 RC4. And, yes, in both situations I use the same gems > versions: > > jdbc-mysql (5.1.13) > activerecord-jdbc-adapter (1.1.1)-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Hi, same problem with sqlite3. c:> jruby -v jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (Java HotSpot(TM) Client VM 1.6.0_25) [Windows XP-x86-java] c:> jgem list ... activerecord-jdbcsqlite3-adapter (1.1.1) rails (3.1.0.rc4) ... c:> jruby -S rails s ... ArgumentError: wrong number of arguments (3 for 2) from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/connection_adapters/abstract/database_statements.rb: 9:in `selec t_all'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/connection_adapters/abstract/query_cache.rb:74:in `cache_sql'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/base.rb:473:in `find_by_sql'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/relation.rb:109:in `to_a'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/relation/finder_methods.rb:370:in `find_first'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/relation/finder_methods.rb:122:in `first'' from org/jruby/RubyKernel.java:2059:in `send'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/relation/finder_methods.rb:257:in `find_by_attributes'' from org/jruby/RubyKernel.java:2071:in `send'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/base.rb:1060:in `method_missing'' from (irb):1:in `evaluate'' from org/jruby/RubyKernel.java:1088:in `eval'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ruby- debug-0.10.4/cli/ru by-debug/commands/irb.rb:99:in `evaluate'' from c:/java/jruby-1.6.2/lib/ruby/1.8/irb.rb:158:in `eval_input'' ... 78 levels... from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rac k/mount/route_set.rb:152:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rac k/mount/code_generation.rb:111:in `recognize'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rac k/mount/code_generation.rb:80:in `optimized_each'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rac k/mount/code_generation.rb:110:in `recognize'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rac k/mount/route_set.rb:141:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib /action_dispatch/routing/route_set.rb:531:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib /action_dispatch/middleware/best_standards_support.rb:17:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/ rack/etag .rb:23:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/ rack/cond itionalget.rb:25:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib /action_dispatch/middleware/head.rb:14:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib /action_dispatch/middleware/params_parser.rb:21:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib /action_dispatch/middleware/flash.rb:243:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/ rack/sess ion/abstract/id.rb:195:in `context'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/ rack/sess ion/abstract/id.rb:190:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib /action_dispatch/middleware/cookies.rb:321:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/l ib/active_record/query_cache.rb:54:in `call''irb(User):002:0> On Jun 10, 1:42 pm, Ken Collins <k...@metaskills.net> wrote:> Well and that is my point. Being an external adapter author myself, I am a witness to exactly how much the activerecord-sqlserver-adapter had to change to support the 3.1 vs 3.0 code base. I would not assume the same adapter version of anything would work 100% moving from ActiveRecord 3.0 to 3.1. > > Besides, just reporting problems is not enough. If have the capability some talk around what you think the problem is and even better yet some stabs at a patch would be nice. Also, have you talked to the external adapter''s author and/or community too? > > - Ken > > On Jun 10, 2011, at 3:08 AM, hipertracker wrote: > > > > > > > > > Ken, I don''t think so. When I create the same application in Rails > > 3.0.8 migrations do not have any errors. The problem exists only for > > Rails 3.1 RC4. And, yes, in both situations I use the same gems > > versions: > > > jdbc-mysql (5.1.13) > > activerecord-jdbc-adapter (1.1.1)-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
I am happy to help out here, if I get some little hints where I can find these internal API changes from3.0 -> 3.1 a quick fix to get the migration and scaffold application working is no problem (commenting out the bind parameter in some method calls) but the moment you start a real application that will not work. - Kristian On Jun 10, 4:42 pm, Ken Collins <k...@metaskills.net> wrote:> Well and that is my point. Being an external adapter author myself, I am a witness to exactly how much the activerecord-sqlserver-adapter had to change to support the 3.1 vs 3.0 code base. I would not assume the same adapter version of anything would work 100% moving from ActiveRecord 3.0 to 3.1. > > Besides, just reporting problems is not enough. If have the capability some talk around what you think the problem is and even better yet some stabs at a patch would be nice. Also, have you talked to the external adapter''s author and/or community too? > > - Ken > > On Jun 10, 2011, at 3:08 AM, hipertracker wrote: > > > > > > > > > Ken, I don''t think so. When I create the same application in Rails > > 3.0.8 migrations do not have any errors. The problem exists only for > > Rails 3.1 RC4. And, yes, in both situations I use the same gems > > versions: > > > jdbc-mysql (5.1.13) > > activerecord-jdbc-adapter (1.1.1)-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Hi, same with jruby 1.6.2/rails 3.1.0.rc4/sqlite3. But works with MRI 1.9.2. c:>jruby -v jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (Java HotSpot(TM) Client VM 1.6.0_25) [Windows XP-x86-java] c:>jgem list ... activerecord-jdbcsqlite3-adapter (1.1.1) rails (3.1.0.rc4) ... c:>jruby -S rails s ... ArgumentError: wrong number of arguments (3 for 2) from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ database_statements.rb:9:in `select_all'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ query_cache.rb:60:in `select_all'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ query_cache.rb:74:in `cache_sql'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ query_cache.rb:60:in `select_all'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/base.rb:473:in `find_by_sql'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/relation.rb:109:in `to_a'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/relation/finder_methods.rb: 370:in `find_first'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/relation/finder_methods.rb: 122:in `first'' from org/jruby/RubyKernel.java:2059:in `send'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/relation/finder_methods.rb: 257:in `find_by_attributes'' from org/jruby/RubyKernel.java:2071:in `send'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/base.rb:1060:in `method_missing'' from (irb):1:in `evaluate'' from org/jruby/RubyKernel.java:1088:in `eval'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ruby- debug-0.10.4/cli/ruby-debug/commands/irb.rb:99:in `evaluate'' from c:/java/jruby-1.6.2/lib/ruby/1.8/irb.rb:158:in `eval_input'' ... 78 levels... from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rack/mount/route_set.rb:152:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rack/mount/code_generation.rb:111:in `recognize'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rack/mount/code_generation.rb:80:in `optimized_each'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rack/mount/code_generation.rb:110:in `recognize'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack- mount-0.8.1/lib/rack/mount/route_set.rb:141:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib/action_dispatch/routing/route_set.rb:531:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib/action_dispatch/middleware/ best_standards_support.rb:17:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/ rack/etag.rb:23:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/ rack/conditionalget.rb:25:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib/action_dispatch/middleware/head.rb:14:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib/action_dispatch/middleware/params_parser.rb: 21:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib/action_dispatch/middleware/flash.rb:243:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/ rack/session/abstract/id.rb:195:in `context'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/ rack/session/abstract/id.rb:190:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ actionpack-3.1.0.rc4/lib/action_dispatch/middleware/cookies.rb:321:in `call'' from c:/java/jruby-1.6.2/lib/ruby/gems/1.8/gems/ activerecord-3.1.0.rc4/lib/active_record/query_cache.rb:54:in `call''irb(User):002:0> On Jun 10, 2:39 am, Ken Collins <k...@metaskills.net> wrote:> Wouldn''t this be a bug in the activerecord-jdbc-adapter? > > - Ken > > On Jun 9, 2011, at 8:13 PM, hipertracker wrote: > > > > > > > > > Rails 3.1 RC4 has broken migrations not only for PostgreSQL but also > > for MySQL. But that time the error is different. > > > $ jruby -v > > jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (Java HotSpot(TM) > > 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java] > > > $ jruby -S rails -v > > Rails 3.1.0.rc4 > > > $ jruby -S rails new myapp -d jdbcpostgresql > > ... > > jruby -S rake db:create > > > $ jruby -S rails g model user name:string > > invoke active_record > > create db/migrate/20110609233144_create_users.rb > > create app/models/user.rb > > invoke test_unit > > create test/unit/user_test.rb > > create test/fixtures/users.yml > > > jruby -S rake db:migrate > > > $ jruby -S rake db:migrate --trace > > ** Invoke db:migrate (first_time) > > ** Invoke environment (first_time) > > ** Execute environment > > ** Invoke db:load_config (first_time) > > ** Invoke rails_env (first_time) > > ** Execute rails_env > > ** Execute db:load_config > > ** Execute db:migrate > > == CreateUsers: migrating > > ===================================================> > -- create_table(:users) > > -> 0.0950s > > -> 0 rows > > == CreateUsers: migrated (0.0960s) > > ==========================================> > > rake aborted! > > An error has occurred, this and all later migrations canceled: > > > wrong number of arguments (3 for 2) > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > > jdbc-adapter-1.1.1/lib/arjdbc/jdbc/adapter.rb:275:in `select'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > > database_statements.rb:9:in `select_all'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > > query_cache.rb:62:in `select_all'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > > database_statements.rb:15:in `select_one'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > > database_statements.rb:21:in `select_value'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > > jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:105:in > > `postgresql_version'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > > jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:136:in > > `supports_insert_with_returning?'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > > jdbc-adapter-1.1.1/lib/arjdbc/postgresql/adapter.rb:247:in `insert'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/migration.rb:719:in > > `record_version_state_after_migrating'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/migration.rb:680:in `migrate'' > > org/jruby/RubyProc.java:268:in `call'' > > org/jruby/RubyProc.java:228:in `call'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/migration.rb:734:in > > `ddl_transaction'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/ > > database_statements.rb:183:in `transaction'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/transactions.rb:208:in > > `transaction'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/migration.rb:734:in > > `ddl_transaction'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/migration.rb:678:in `migrate'' > > org/jruby/RubyArray.java:1602:in `each'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/migration.rb:663:in `migrate'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/migration.rb:541:in `up'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/migration.rb:522:in `migrate'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/ > > activerecord-3.1.0.rc4/lib/active_record/railties/databases.rake: > > 157:in `(root)'' > > org/jruby/RubyProc.java:268:in `call'' > > org/jruby/RubyProc.java:228:in `call'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/task.rb:205:in `execute'' > > org/jruby/RubyArray.java:1602:in `each'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/task.rb:200:in `execute'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/task.rb:158:in `invoke_with_call_chain'' > > /Users/hipertracker/.rvm/rubies/jruby-1.6.2/lib/ruby/1.8/monitor.rb: > > 191:in `mon_synchronize'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/task.rb:151:in `invoke_with_call_chain'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/task.rb:144:in `invoke'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/application.rb:112:in `invoke_task'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/application.rb:90:in `top_level'' > > org/jruby/RubyArray.java:1602:in `each'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/application.rb:90:in `top_level'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/application.rb:129:in `standard_exception_handling'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/application.rb:84:in `top_level'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/application.rb:62:in `run'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/application.rb:129:in `standard_exception_handling'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > lib/rake/application.rb:59:in `run'' > > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/rake-0.9.2/ > > bin/rake:32:in `(root)'' > > org/jruby/RubyKernel.java:1063:in `load'' > > /Users/hipertracker/.rvm/rubies/jruby-1.6.2/bin/rake:19:in `(root)'' > > Tasks: TOP => db:migrate > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > > To post to this group, send email to rubyonrails-core@googlegroups.com. > > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Ketan Padegaonkar
2011-Jul-21 01:57 UTC
Re: Re: Rails 3.1 RC4 has broken migrations also for MySQL
Anyone found a solution to this as yet? Ketan studios.thoughtworks.com | twitter.com/ketanpkr On Fri, Jun 10, 2011 at 5:21 AM, mkristian <meier.kristian@gmail.com> wrote:> I am happy to help out here, if I get some little hints where I can > find these internal API changes from3.0 -> 3.1 > > a quick fix to get the migration and scaffold application working is > no problem (commenting out the bind parameter in some method calls) > but the moment you start a real application that will not work. > > - Kristian > > On Jun 10, 4:42 pm, Ken Collins <k...@metaskills.net> wrote: >> Well and that is my point. Being an external adapter author myself, I am a witness to exactly how much the activerecord-sqlserver-adapter had to change to support the 3.1 vs 3.0 code base. I would not assume the same adapter version of anything would work 100% moving from ActiveRecord 3.0 to 3.1. >> >> Besides, just reporting problems is not enough. If have the capability some talk around what you think the problem is and even better yet some stabs at a patch would be nice. Also, have you talked to the external adapter''s author and/or community too? >> >> - Ken >> >> On Jun 10, 2011, at 3:08 AM, hipertracker wrote: >> >> >> >> >> >> >> >> > Ken, I don''t think so. When I create the same application in Rails >> > 3.0.8 migrations do not have any errors. The problem exists only for >> > Rails 3.1 RC4. And, yes, in both situations I use the same gems >> > versions: >> >> > jdbc-mysql (5.1.13) >> > activerecord-jdbc-adapter (1.1.1) > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Helmut Juskewycz
2011-Jul-22 08:48 UTC
Re: Rails 3.1 RC4 has broken migrations also for MySQL
Having the same error. Did anyone got it working? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Ken Collins is correct. It''s not that migrations are broken in Rails 3.1 RC4, but rather the ActiveRecord API has changed and the adapter has not yet caught up. This issue appears to have already been fixed in the activerecord-jdbc- adapter source, but there hasn''t been a new 1.1.3 release yet, which isn''t surprising given that Rails 3.1 hasn''t been released yet. If you want to run it now, then add the following to your Gemfile: gem ''activerecord-jdbcpostgresql-adapter'', :git => ''https://github.com/ nicksieger/activerecord-jdbc-adapter.git'' Scott On Jun 10, 1:13 am, hipertracker <hipertrac...@gmail.com> wrote:> Rails 3.1 RC4 has broken migrations not only for PostgreSQL but also > for MySQL. But that time the error is different. > > $ jruby -v > jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (Java HotSpot(TM) > 64-Bit Server VM 1.6.0_24) [darwin-x86_64-java] > > $ jruby -S rails -v > Rails 3.1.0.rc4 > > $ jruby -S rails new myapp -d jdbcpostgresql > ... > jruby -S rake db:create > > $ jruby -S rails g model user name:string > invoke active_record > create db/migrate/20110609233144_create_users.rb > create app/models/user.rb > invoke test_unit > create test/unit/user_test.rb > create test/fixtures/users.yml > > jruby -S rake db:migrate > > $ jruby -S rake db:migrate --trace > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Invoke db:load_config (first_time) > ** Invoke rails_env (first_time) > ** Execute rails_env > ** Execute db:load_config > ** Execute db:migrate > == CreateUsers: migrating > ===================================================> -- create_table(:users) > -> 0.0950s > -> 0 rows > == CreateUsers: migrated (0.0960s) > ==========================================> > rake aborted! > An error has occurred, this and all later migrations canceled: > > wrong number of arguments (3 for 2) > /Users/hipertracker/.rvm/gems/jruby-1.6.2@rails-pre/gems/activerecord- > jdbc-adapter-1.1.1/lib/arjdbc/jdbc/adapter.rb:275:in `select''-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Correction to previous message: You''ve probably spotted (and guessed) that my gem string was slightly incorrect and should have read ''activerecord-jdbc-adapter'' and not ''''activerecord-jdbcpostgresql-adapter''; but the principle is there. Doh! In any case, migrations are working for me with Postgres and the latest JDBC adapter from master. Scott -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/q463Pd7pPXEJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.