Re: [Rails] Rails 3 and postgresql

2011-09-18 Thread gato pardo
> > Notice how the spec for id is different between the two tables, I > suppose that is due to the fact that you are providing your own > nextval for id (there is no spec for it in sessions so rails will > assume the default id column). I suspect this may be the cause of the > problem. First I su

Re: [Rails] Rails 3 and postgresql

2011-09-18 Thread Colin Law
On 18 September 2011 11:13, gato pardo wrote: >> >> >> > Well you should have, you should have used rails migrations to create >> > the db, unless this is a legacy database.  Create schema.rb by running >> > rake db:schema:dump >> > and post it here, though whether this is anything to do with the

Re: [Rails] Rails 3 and postgresql

2011-09-18 Thread gato pardo
> > > Well you should have, you should have used rails migrations to create > > the db, unless this is a legacy database. Create schema.rb by running > > rake db:schema:dump > > and post it here, though whether this is anything to do with the > > problem is unlikely. > > Also post model/pack.rb p

Re: [Rails] Rails 3 and postgresql

2011-09-18 Thread Colin Law
On 18 September 2011 10:35, Colin Law wrote: > On 18 September 2011 10:29, gato pardo wrote: >> [...] >>   1.- Results with Pack.find 1 >> >> "irb(main):001:0> Pack.find 1 >> Could not log "sql.active_record" event. NoMethodError: undefined method >> `name' for nil:NilClass >> PGError: ERROR:  ze

Re: [Rails] Rails 3 and postgresql

2011-09-18 Thread Colin Law
On 18 September 2011 10:29, gato pardo wrote: > [...] >   1.- Results with Pack.find 1 > > "irb(main):001:0> Pack.find 1 > Could not log "sql.active_record" event. NoMethodError: undefined method > `name' for nil:NilClass > PGError: ERROR:  zero-length delimited identifier at or near > LINE 1

Re: [Rails] Rails 3 and postgresql

2011-09-18 Thread gato pardo
> What happens if, in the rails console, you type > Pack.find 1 > > Paste the result here. > Also show us db/schema.rb > > Colin > -- > gplus.to/clanlaw > > Thanks Colin: 1.- Results with Pack.find 1 "irb(main):001:0> Pack.find 1 Could not log "sql.active_record" event. NoMethodError: undefined

Re: [Rails] Rails 3 and postgresql

2011-09-18 Thread Colin Law
On 18 September 2011 02:25, gato pardo wrote: > I have a simple project created around a very, very simple database: one > main table packs with just three rows >  Column |  Type              | > Modifiers > > +-+-

Re: [Rails] Rails 3 and postgresql

2011-09-17 Thread gato pardo
Thanks Everaldo: but I have already checked the id variable value by changing: @album = Pack.find id to @album = Pack.find 1 the result is the same. I wonder if someone has noticed some bug with the pg gem. I do not have any other explanation so far. Gato Pardo ===

Re: [Rails] Rails 3 and postgresql

2011-09-17 Thread Everaldo Gomes
Hi! It seems like the id variable is nil. Could you check this? Best Regards, Everaldo On Sat, Sep 17, 2011 at 10:25 PM, gato pardo wrote: > I have a simple project created around a very, very simple database: one > main table packs with just three rows > Column | Type

[Rails] Rails 3 and postgresql

2011-09-17 Thread gato pardo
I have a simple project created around a very, very simple database: one main table packs with just three rows Column | Type | Modifiers +-+ id | integer

[Rails] rails 3 and postgresql scemas

2011-05-19 Thread sleepwalker
Does Rails 3 support native working with postgresql schemas, or I should try some own solution? I have some already-created postgresql database with 4 or somth schemas. By putting "schema_search_path: ejabber, public, admin, statistic" into database.yml I told Rails that I have more than 1 schema.