Yes and it created tha database.yml development: adapter: postgresql encoding: unicode database: postgres_development pool: 5 username: postgres password: 031969
test: adapter: postgresql encoding: unicode database: rubyPostgre_test pool: 5 username: rubyPostgre password: production: adapter: postgresql encoding: unicode database: rubyPostgre_production pool: 5 username: rubyPostgre password: And my query it to be runing on development enviroment. Can u help me run my query? Thanks 2010/5/4 Dhruva Sagar <[email protected]> > Have you created a rails application ? > What in your opinion is Post? Ruby expects to find a constant by that name. > class names in Ruby are constants. constant is any word that starts with a > capital letter. > > If say you've written a class Post, then you must have done so in a file. > You need to require that file when inside irb to load that class. > > On Tue, May 4, 2010 at 17:08, jv neto <[email protected]> wrote: > >> Hi All >> I never worked with RUBY my fisrt time. >> >> I'd like to run this query by IRB and see how many line it will show >> me : >> >> select codigo, nome from teste >> >> My database is postgre 8.4 >> >> Look what i did to do it: >> >> >> irb(main):006:0> Post.find_by_sql “SELECT codigo, tirulo from teste” >> NameError: uninitialized constant Post >> from (irb):6 >> irb(main):007:0> >> >> What is going on there? >> >> Thanks >> >> Grato >> >> -- >> 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]<rubyonrails-talk%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > > > -- > > Thanks & Regards, > Dhruva Sagar. > > -- > 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]<rubyonrails-talk%[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.

