https://qiita.com/NaokiIshimura/items/eee473675d624a17310f
↑
こちらの記事を参考にして、
HerokuにRailsアプリをデプロイしたいと思っています。
記事の通りに進めていたところ、
pgというgemをターミナルでインストールしようとすると、
Fetching pg 1.1.4 Installing pg 1.1.4 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/ec2-user/.rvm/gems/ruby-2.6.3/gems/pg-1.1.4/ext /home/ec2-user/.rvm/rubies/ruby-2.6.3/bin/ruby -I /home/ec2-user/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0 -r ./siteconf20190627-4395-1jsiz1m.rb extconf.rb 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 *** 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.
とエラーになってしまいます。
そこで色々調べた結果、こちらの記事↓
https://qiita.com/tdrk/items/812e7ea763080e147757
にたどり着きました。
この記事によると、
brew install postgresql
とターミナルでコマンドをうってpostgresqlをインストールすることで
解決すると書かれていますが、
brewはmacでしか通用しないコマンドなので、
僕が使っているcloud9では通用しません。
cloud9のターミナルではどのようにコマンドを打てば
postgresqlをインストールすることができるのでしょうか?

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/06/27 14:13
2019/06/27 22:15