Reputation: 39
I have cloned the git repository of my rails project after reinstalling the Linux Mint. When I am running the bundle install I am getting the following error.
Rails version : 3.2.8
ruby version: 1.9.3p0
An error occurred while installing pg (0.12.2), and Bundler cannot continue.
Make sure that `gem install pg -v '0.12.2'` succeeds before bundling.
Here is my gem file :
source 'https://rubygems.org'
gem 'rails', '3.2.3'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.9.0'
end
group :assets do
gem 'sass-rails','3.2.4'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails'
group :test do
gem 'capybara', '1.1.2'
end
group :production do
gem 'pg', '0.12.2'
end
Upvotes: 3
Views: 436
Reputation: 1872
You can run bundle install --without production
which will install all the relevant gems BUT the ones for production. Since you have sqlite configured there, it won't install the postgres gem.
However, if you do want to install all of the gems, you might going to have to install postgresql first: sudo apt-get install postgresql
If this doesn't work, try to run gem install pg -v '0.12.2'
and post the error log.
Upvotes: 3