I am trying to figure out how can I connect to a
remote database and retrieve information through a rails application.
I did something like this but didnt work.
I am running rails application on sqlite3 database in my local machine
and I am trying to connect to a remote database which is a postgresql
I put this code in my application controller-----
:adapter => “postgresql”,
:database => “database name”,
:host => “192.168.10.21”,
:port => “5432”,
:username => “username”,
:password => “password”
people controller code-----
@items = Item.find(:all)
<% @items.each do |item| %>
But this code doesnt work and it gives me error.
Can any one help?