This project is archived and is in readonly mode.

#2445 ✓invalid
Renaud Kern

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

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>

Pages