簡體   English   中英

我無法將我的rails應用程序推送到Heroku /獲取'pg'寶石安裝?

[英]I am having trouble pushing my rails app to Heroku/getting the 'pg' gem to install?

最初我無法將我的rails 4應用程序推送到heroku,因為我的數據庫是sqlite,所以現在我一直在嘗試安裝Postgresql gem('pg'),但我沒有運氣。 這是運行bundle install后我在終端中收到的錯誤消息:

checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***

跑完之后
gem install pg -v'0.17.1'--with-pg-config

我在終端中收到此錯誤:

ERROR:  While executing gem ... (Gem::Requirement::BadRequirementError)
 Illformed requirement ["0.17.1--with-pg_config"]
/project$ gem install pg -v '0.17.1'--with-pg-config
ERROR:  Could not find a valid gem 'pg' (= 0.17.1.pre..pre.with.pre.pg.pre.config) in   

any repository
ERROR:  Possible alternatives: pg

謝謝您的幫助。

如果你沒有安裝postgres ,你可能想要:

sudo apt-get install postgresql
sudo apt-get install libpq-dev

以下是gem install pgbundle

如果你已經安裝的Postgres和運行gem install pg是不行的,你必須運行which pg_config到你的路徑pg_config和運行gem install pg -- --with-pg-config= output_from_previous_command

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM