Hi everyone,
I am setting up my first Rails application using a Posgre backend and
the latest gems on windows.  After running through the onlamp tutorial
I am having a problem where my records are not displayed, but the
surrounding page is.  I can see the product attributes are there if I
look at the response template parameters, but the values do not appear
on the page.  For example, if I go to localhost:3000/product/list I
see the show/edit/destroy links, one set of links for each record in
my table.  However, they are next to blank rows.  If I try to update a
record or create a new record, I get an update button or a new button,
but no fields to fill in.  Thus far I have done nothing except:
1. create a model
2. create a controller and add the scaffold line
This is using WEBrick only.  I am not using any custom templates yet.
Here are my response template parameters:
product: &id001 !ruby/object:Product 
  attributes: 
    dateTest: "2005-01-05"
    id: "2"
    description: Second Prod
  errors: !ruby/object:ActiveRecord::Errors 
    base: *id001
    errors: {}
rescues_path:
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/templates/rescues/
action_methods: 
  - destroy
  - update
  - new
  - edit
  - show
  - wsdl
  - index
  - create
  - list
flash: !ruby/hash:ActionController::Flash::FlashHash {}
Pat Mac <patslists@...> writes:> > Hi everyone, > > I am setting up my first Rails application using a Posgre backend and > the latest gems on windows. After running through the onlamp tutorial > I am having a problem where my records are not displayed, but the > surrounding page is. I can see the product attributes are there if I > look at the response template parameters, but the values do not appear > on the page. For example, if I go to localhost:3000/product/list I > see the show/edit/destroy links, one set of links for each record in > my table. However, they are next to blank rows. If I try to update a > record or create a new record, I get an update button or a new button, > but no fields to fill in. Thus far I have done nothing except: > 1. create a model > 2. create a controller and add the scaffold line > This is using WEBrick only. I am not using any custom templates yet.I am having the same problem. In addition, I tried to just create the views manually and I do not have an update procedure. Did you ever get this resolved? anybody else have any ideas?
Pat Mac
2005-Apr-12  11:35 UTC
Re: Re: postgresql -- records are not displayed but template is
On Apr 11, 2005 11:28 AM, Scott <hollywood77s-YDxpq3io04c@public.gmane.org> wrote:> Pat Mac <patslists@...> writes: > > > > > Hi everyone, > > > > I am setting up my first Rails application using a Posgre backend and > > the latest gems on windows. After running through the onlamp tutorial > > I am having a problem where my records are not displayed, but the > > surrounding page is. I can see the product attributes are there if I > > look at the response template parameters, but the values do not appear > > on the page. For example, if I go to localhost:3000/product/list I > > see the show/edit/destroy links, one set of links for each record in > > my table. However, they are next to blank rows. If I try to update a > > record or create a new record, I get an update button or a new button, > > but no fields to fill in. Thus far I have done nothing except: > > 1. create a model > > 2. create a controller and add the scaffold line > > This is using WEBrick only. I am not using any custom templates yet. > > I am having the same problem. In addition, I tried to just create the views > manually and I do not have an update procedure. > > Did you ever get this resolved? > > anybody else have any ideas? > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >I was using my own schema, and I fixed it by including the schema in my rails user''s search path: ALTER USER railsuser SET search_path TO my_schema,foo I also commented out a few lines related to schema in postgresql_adapter.rb, but I don''t think that was necessary.
Dave Lee
2005-Apr-12  16:08 UTC
Re: Re: postgresql -- records are not displayed but template is
Pat Mac <patslists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I was using my own schema, and I fixed it by including the schema in > my rails user''s search path: > ALTER USER railsuser SET search_path TO my_schema,foo > > I also commented out a few lines related to schema in > postgresql_adapter.rb, but I don''t think that was necessary.I have submitted a patch to support postgresql schemas, http://dev.rubyonrails.com/ticket/827 it also adds support for older versions of postgresql (< 7.4) please test out the patch if interested, and email me if you have any troubles. hopefully it will get incoporated. Dave