0

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

Obromios
  • 15,408
  • 15
  • 72
  • 127

3 Answers3

1

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

Obromios
  • 15,408
  • 15
  • 72
  • 127
  • Because 'Bundler remembers the exact versions it installed in Gemfile.lock.' -http://gembundler.com/man/bundle-update.1.html – ılǝ Jan 30 '13 at 07:14
1

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!

0

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 :)

m.sajjad.s
  • 711
  • 7
  • 19