This project is archived and is in readonly mode.
migration fail with postgresql and ruby 1.9.1
Reported by Renaud Kern | April 7th, 2009 @ 08:10 PM
Hi,
I don't know if it's active record bug or one from postgresql driver, but the following migration give's an error with ruby 1.9.1 (work fine with ruby 1.8.6) :
require 'active_record' class SomeMigration < ActiveRecord::Migration def self.up
create_table "tramp_accounts" do |t|
t.string "code"
t.string "label"
t.string "orientation"
t.boolean "agregator"
t.integer "parent_id"
t.datetime "created_at"
t.datetime "updated_at"
end
end end ActiveRecord::Base.establish_connection(:adapter=>'postgresql',
:database=>'tramp_test',
:username=>'postgres')
SomeMigration.migrate(:up)
===
TypeError: wrong argument type String (expected Array)
method initialize in postgresql_adapter.rb at line 916 method new in postgresql_adapter.rb at line 916 method connect in postgresql_adapter.rb at line 916 method initialize in postgresql_adapter.rb at line 210 method new in postgresql_adapter.rb at line 37 method postgresql_connection in postgresql_adapter.rb at line 37 method new_connection in connection_pool.rb at line 223 method checkout_new_connection in connection_pool.rb at line 245 method block (2 levels) in checkout in connection_pool.rb at line 188 method loop in connection_pool.rb at line 184 method block in checkout in connection_pool.rb at line 184 method mon_synchronize in monitor.rb at line 190 method checkout in connection_pool.rb at line 183 method connection in connection_pool.rb at line 98 method retrieve_connection in connection_pool.rb at line 326 method retrieve_connection in connection_specification.rb at line 123 method connection in connection_specification.rb at line 115 method connection in migration.rb at line 342 method block in method_missing in migration.rb at line 352 method block in say_with_time in migration.rb at line 328 method measure in benchmark.rb at line 293 method say_with_time in migration.rb at line 328 method method_missing in migration.rb at line 348 method up in try_sqlite3_migration.rb at line 8 method block in migrate in migration.rb at line 282 method measure in benchmark.rb at line 293 method migrate in migration.rb at line 282
===
Cheers,
Renoke
Comments and changes to this ticket
-
Max Lapshin April 20th, 2009 @ 05:17 PM
It is even impossible to read stacktrace. If you wish this bug to be fixed, try to clear your stacktrace.
-
CancelProfileIsBroken August 6th, 2009 @ 01:52 PM
- Tag changed from migration, postgresql, ruby1.9 to bugmash, migration, postgresql, ruby1.9
-
Akira Matsuda August 6th, 2009 @ 05:31 PM
I couldn't reproduce the bug.
I tried your example in the following environment:
* OS: Leopard * Ruby: 1.9.1 p129 * Rails: 2.3.3 gem * PostgreSQL: 8.3.7 * PostgreSQL driver: pg-0.8.0 gembut it did not raise the error you reported.
-
Nikolay Petrachkov August 8th, 2009 @ 07:44 AM
- Assigned user set to Jeremy Kemper
"not reproducible"
ruby: ruby 1.9.2dev (2009-08-07 trunk 24440) [x86_64-linux]
OS: Ubuntu 9.04
Postgres: 8.3.7
Postgres gem: pg 0.8
Table created without an error.
-
Jeremy Kemper August 8th, 2009 @ 08:47 AM
- State changed from new to invalid
-
CancelProfileIsBroken August 8th, 2009 @ 11:06 PM
- Assigned user cleared.
- Tag changed from bugmash, migration, postgresql, ruby1.9 to migration, postgresql, ruby1.9
- Milestone cleared.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>