Have you installed the Postgres gem (gem install postgres)? Don''t
install
postgres-pr, the pure ruby wrapper, as it does not work at all last I tried.
The postgres gem does require compilation, so make sure you have the
postgres devel headers and a proper compiler.
Jason
On 8/18/06, TT <tlkj@hotmail.com> wrote:>
> I''ve followed the tutorial and just don''t get it.
>
> How do I connect my ruby/rails sample app to my postgres database.
>
> I did follow step 1-4 of the tutorial, I go to step 5:
> (http://wiki.rubyonrails.org/rails/pages/TutorialStepFive)
>
> and try the "rake" commmand and get this:
> rake aborted!
> no such file to load -- postgres
>
> so I ran with -trace and get this:
>
> F:\rubySampleApp>rake -trace
> --------------------------------------------------------------------
> f:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_re
> quire'': no such file to load -- ace (LoadError)
> from
> f:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
> quire''
> from
> f:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1749:in `do_o
> ption''
> from
> f:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1787:in `hand
> le_options''
> from f:/ruby/lib/ruby/1.8/getoptlong.rb:460:in `each''
> from f:/ruby/lib/ruby/1.8/getoptlong.rb:457:in `each''
> from
> f:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1787:in `hand
> le_options''
> from
> f:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1897:in
`run''
>
> from f:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
> from f:/ruby/bin/rake.bat:25
> --------------------------------------------------------------
>
>
> now, my database.yml file contains this:
>
> development:
> adapter: postgresql
> database: mace
> username: postgres
> password: postgres
> host: localhost
>
> I am running on Windows XP and have Postgres 8.0.3 running.
>
> Thank you in advance for your ideas !
>
> T
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060818/6a8f77ef/attachment.html