Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
rails with postgres error while loading
2 Posts
rails with postgres error while loading

Hai All,

I am trying to build a rails application from a legacy database which is in postgres. I could connect rails to me legacy application with out any error.I could access a data in the table through ./script/console . But when I just created a controller (didn't added a single line of code in any of the generated file ) and tried to access the page like user/index i got the following error..

MissingSourceFile in UserController#index

no such file to load -- postgres

RAILS_ROOT: /home/brijith/Desktop/traacs Application Trace | Framework Trace | Full Trace

Please help me !!!

When I googled with this error message many of them says to install ruby_pg or pg-0.8.0.gem. But I have already installed pg-0.8.0.gem


i'm trying to simulate your error here in my note but i didn't.

I installed postgresql through the command:

sudo apt-get install postgresql postgresql-client pgadmin3 postgresql-server-dev-8.3

And then i installed the gem pg

sudo gem install pg

With this steps, my access to postgresql db works. Everything works fine here!! Try this! If didn't work, post here again and i'll try help you one more time.

Hope this note can be helpfull.

2 Posts
Login to add your message