Question

When I type, "gem install pg", I get a message that the gem is installed along with the documenation.

But when I put "gem 'pg'" in the gemfile, and type "bundle install", it says that the bundle is complete. However if I type "bundle show pg", it says that it cannot find 'pg' in the current bundle. Accordingly, a command like "rake db:create:all", gives back, "no such file to load -- pg"

I am running on Ubuntu 11.04, Rails 3.0.11 and ruby 1.9.2.

Chris

Was it helpful?

Solution

I managed to fix this by deleting my Gemfile.lock and then running bundle install again. I am not sure why this works.

OTHER TIPS

How I solved this problem: I found the string in Gemfile.lock, in "GEM" section:

pg (0.15.1-x86-mingw32)

But I work on x64 OS (Windows 7 64), and "gem list" shows me "pg" gem as:

pg (0.15.1 x64-mingw32)

So, I replaced the string in Gemfile.lock to:

pg (0.15.1-x64-mingw32)

And my project works!

On Linux, I had to install these two devel libraries

sudo apt-get install postgresql
sudo apt-get install pgadmin3
bundle install

thats worked for me :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top