Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

migration fail with postgresql and ruby 1.9.1

#2445

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

Reported by Renaud Kern · April 7th, 2009 @ 08:10 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Max Lapshin
    Max Lapshin

    It is even impossible to read stacktrace. If you wish this bug to be fixed, try to clear your stacktrace.

    April 20th, 2009 @ 05:17 PM

  2. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from migration, postgresql, ruby1.9 to bugmash, migration, postgresql, ruby1.9

    August 6th, 2009 @ 01:52 PM

  3. Akira Matsuda
    Akira Matsuda

    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 gem

    but it did not raise the error you reported.

    August 6th, 2009 @ 05:31 PM

  4. Nikolay Petrachkov
    Nikolay Petrachkov
    • 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.

    August 8th, 2009 @ 07:44 AM

  5. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to invalid

    August 8th, 2009 @ 08:47 AM

  6. CancelProfileIsBroken
    CancelProfileIsBroken
    • Assigned user cleared.
    • Tag changed from bugmash, migration, postgresql, ruby1.9 to migration, postgresql, ruby1.9
    • Milestone cleared.

    August 8th, 2009 @ 11:06 PM