Postgres错误捆绑安装

时间:2013-11-28 06:28:59

标签: ruby-on-rails postgresql heroku-postgres

当我运行

$bundle install
我在heroku上运行项目所以我不得不切换到postgress。我出于某种原因不断收到此错误。
An error occurred while installing pg (0.15.1), and Bundler cannot
continue.
Make sure that gem install pg -v '0.15.1' succeeds before bundling.

source 'https://rubygems.org'
ruby '2.0.0'

gem 'rails', '4.0.1'
gem 'bootstrap-sass', '2.3.2.0'
gem 'bcrypt-ruby', '3.1.2'
gem 'faker', '1.1.2'
gem 'will_paginate', '3.0.4'
gem 'bootstrap-will_paginate', '0.0.9'

group :development, :test do
  gem 'sqlite3', '1.3.8'
  gem 'rspec-rails', '2.13.1'
  gem 'guard-rspec', '2.5.0'
  gem 'spork-rails', '4.0.0'
  gem 'guard-spork', '1.5.0'
  gem 'childprocess', '0.3.6'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
  gem 'factory_girl_rails', '4.2.0'
  gem 'cucumber-rails', '1.3.0', :require => false
  gem 'database_cleaner', github: 'bmabey/database_cleaner'

  gem 'growl', '1.0.3'



gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

3 个答案:

答案 0 :(得分:0)

尝试删除gem文件中的版本: 宝石'pg' 只有...

答案 1 :(得分:0)

从您的Gemfile中,您似乎使用sqlite3进行开发,并使用postgres进行生产。您不必在本地安装postgres。只需在没有生产组的情况下进行捆绑安装:

bundle install --without production

答案 2 :(得分:0)

尝试捆绑安装 - 没有开发测试postgresql