After upgrading to 1.1, I can''t run any unit tests. Apparently when I run rake test_units, it uses a migration to set up the database. Unfortunately when it runs the migration, it''s adding not null constraints to every field, even though I haven''t got that set up. I''m using the ruby-postgres (0.7.1.2005.12.21) adapter with PostgreSQL 8.1.0. I''m getting closer to switching over to MySQL, even though I prefer PostgreSQL in general, as there are lots of little gotchas that get in the way of development. I always question whether the rails code base actually gets tested against postgres. Pat
On Sun, 2006-04-02 at 16:19 -0700, Pat Maddox wrote:> After upgrading to 1.1, I can''t run any unit tests. Apparently when I > run rake test_units, it uses a migration to set up the database. > Unfortunately when it runs the migration, it''s adding not null > constraints to every field, even though I haven''t got that set up. > I''m using the ruby-postgres (0.7.1.2005.12.21) adapter with PostgreSQL > 8.1.0. > > I''m getting closer to switching over to MySQL, even though I prefer > PostgreSQL in general, as there are lots of little gotchas that get in > the way of development. I always question whether the rails code base > actually gets tested against postgres.----- I''m using gem... postgres (0.7.1) The extension library to access a PostgreSQL database from Ruby. rails (1.1.0, 1.0.0) Web-application framework with template engine, control-flow layer, and ORM. rake (0.7.0, 0.6.2) Ruby based make-like utility. # rpm -q postgresql postgresql-7.4.8-1.RHEL4.1 and I just tested this and I didn''t have a problem with NOT NULL migrations...they turned out just as defined. Craig
Pat Maddox wrote:> After upgrading to 1.1, I can''t run any unit tests. Apparently when I > run rake test_units, it uses a migration to set up the database. > Unfortunately when it runs the migration, it''s adding not null > constraints to every field, even though I haven''t got that set up. > I''m using the ruby-postgres (0.7.1.2005.12.21) adapter with PostgreSQL > 8.1.0. > > I''m getting closer to switching over to MySQL, even though I prefer > PostgreSQL in general, as there are lots of little gotchas that get in > the way of development. I always question whether the rails code base > actually gets tested against postgres. > > PatPlease try using ''postgres'' gem instead of ''ruby-postgres'' gem and let us know what happens. There are 3 different postgres drivers for Ruby, we should probably bless one of them as the preferred driver for rails-1.1 and beyond. -- Posted via http://www.ruby-forum.com/.
On 4/2/06, John Smith <nospam1@nospam1.lan> wrote:> Pat Maddox wrote: > > After upgrading to 1.1, I can''t run any unit tests. Apparently when I > > run rake test_units, it uses a migration to set up the database. > > Unfortunately when it runs the migration, it''s adding not null > > constraints to every field, even though I haven''t got that set up. > > I''m using the ruby-postgres (0.7.1.2005.12.21) adapter with PostgreSQL > > 8.1.0. > > > > I''m getting closer to switching over to MySQL, even though I prefer > > PostgreSQL in general, as there are lots of little gotchas that get in > > the way of development. I always question whether the rails code base > > actually gets tested against postgres. > > > > Pat > > Please try using ''postgres'' gem instead of ''ruby-postgres'' gem and let > us know what happens. > > There are 3 different postgres drivers for Ruby, we should probably > bless one of them as the preferred driver for rails-1.1 and beyond. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Okay some of my gems were messed up so it took a while, but the tests work using ''postgres'' instead. As for the three different drivers..it''s just really confusing, to tell you the truth. Periodically I post to the list asking which one to use, but there''s never a consensus it seems. Thanks for the help. Pat
Use the latest release version of ruby-postgres, no the latest build. I attempted to ''update'' once before and ran into the same problem. -- -- Tom Mornini On Apr 2, 2006, at 4:19 PM, Pat Maddox wrote:> After upgrading to 1.1, I can''t run any unit tests. Apparently when I > run rake test_units, it uses a migration to set up the database. > Unfortunately when it runs the migration, it''s adding not null > constraints to every field, even though I haven''t got that set up. > I''m using the ruby-postgres (0.7.1.2005.12.21) adapter with PostgreSQL > 8.1.0. > > I''m getting closer to switching over to MySQL, even though I prefer > PostgreSQL in general, as there are lots of little gotchas that get in > the way of development. I always question whether the rails code base > actually gets tested against postgres. > > Pat > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
On Sun, 2006-04-02 at 22:52 -0700, Tom Mornini wrote:> Use the latest release version of ruby-postgres, no the latest build. > > I attempted to ''update'' once before and ran into the same problem.---- I guess I was lucky to have chosen the postgres gem and thus was spared but I have been having a problem now of new rows created in the schema_info table rather than updating the 1 row. I do recall someone asking about that in the past so I know it''s in the archives but if it''s an easy answer, perhaps someone wants to save me the trouble of searching the archives. Craig