2012-07-15 2 views
1

heroku에 앱을 게시하는 데 문제가 있습니다. 내가 수신하고있는 오류 메시지는 다음과 같습니다Heroku 및 Gemfile 관리

"Installing pg (0.14.0) with native extensions /Users/blanecordes/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Users/blanecordes/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb --with-pg-config=/users/blanecordes/postgresql/bin/pg_config Using config values from /users/blanecordes/postgresql/bin/pg_config sh: /users/blanecordes/postgresql/bin/pg_config: No such file or directory sh: /users/blanecordes/postgresql/bin/pg_config: No such file or directory checking for libpq-fe.h... * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options."

내 gemfile은 다음과 같습니다

source 'https://rubygems.org' 

gem 'rails', '3.2.3' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3' 
gem 'pg' 
gem 'nokogiri' 
gem 'pry' 

group :test, :development do 
gem 'sqlite3' 
gem "rspec-rails", "~> 2.0" 
end 

# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
gem 'sass-rails', '~> 3.2.3' 
gem 'coffee-rails', '~> 3.2.1' 

# See https://github.com/sstephenson/execjs#readme for more supported runtimes 
# gem 'therubyracer', :platform => :ruby 

    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

# To use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'ruby-debug19', :require => 'ruby-debug' 
+0

먼저 Heroku Postgres 애드온을 설치하십시오. https://addons.heroku.com/heroku-postgresql – elithrar

답변

1

당신은 당신의 gemfile에 sqlite3pg 있습니다. 그들은 같은 일을하기 때문에 양립 할 수 없다. 영웅과 함께 머무를 계획이라면 가장 좋은 방법은 로컬 컴퓨터에 install postgresql입니다. 그런 다음 gemfile에서 sqlite3을 제거하십시오 (두 위치에 있습니다).

로컬 컴퓨터에서 sqlite3을 사용하려면 생산 블록에 pg을 넣고 테스트 개발 블록에 sqlite3 만 넣으십시오.

# gem 'sqlite3' 
# gem 'pg' 

group :production do 
    gem 'pg' 
end 


group :test, :development do 
    gem 'sqlite3' 
    gem "rspec-rails", "~> 2.0" 
end