>
> 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
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
>
> > 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
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
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
> 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
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
>
> +-+-
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
===
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
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
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.
11 matches
Mail list logo