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


==================================================
On Sat, Sep 17, 2011 at 9:40 PM, Everaldo Gomes <[email protected]>wrote:

> 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 <[email protected]> wrote:
>
>> 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                        | not null default
>> nextval('packs_id_seq'::regclass)
>>  nombre | character varying(40)   |
>>  path      | character varying(250) |
>>
>> in a method  I have :
>>         id = params[:album].to_i
>>          @album = Pack.find id
>> That is the sentence located using debugger. The answer in the browser:
>> ActiveRecord::StatementInvalid in FotosController#inic
>>
>> PGError: ERROR:  zero-length delimited identifier at or near """"
>> LINE 1: SELECT  "packs".* FROM "packs"  WHERE "packs"."" = $1 LIMIT ...
>>                                                       ^
>> : SELECT  "packs".* FROM "packs"  WHERE "packs"."" = $1 LIMIT 1
>>
>> It used to work with rails 2. What happened ?
>>
>> Gato Pardo
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to