Connect to postgres db

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

My guess would be that you need to install the postgres gem.

Joe

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

Joe R. wrote:

My guess would be that you need to install the postgres gem.

Joe

ok. I tried this:

gem install postgress (from my sample app directory)
and I get this error:

F:\rubySampleApp>gem install postgres
ERROR: While executing gem … (URI::InvalidURIError)
bad URI(is not URI?): “xxproxy:8080”

Note, that I am behind a firewall and I have set this environment
variable:
set http_proxy=“xxproxy:8080”