cloud9でGitHubのコードをcloneし、rails serverとしたらエラーになりました。
原因がわからず詰まっているのでどなたか教えていただけないでしょうか?
1 git clone https://github.com/○○/○○.git
2 cd ○○/ (クローンしたプロジェクトへ移動)
3 rails server
Could not find pg-0.20.0 in any of the sources Run `bundle install` to install missing gems.
4 bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/pg-0.20.0/ext /home/ec2-user/.rvm/rubies/ruby-2.6.0/bin/ruby -I /home/ec2-user/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0 -r ./siteconf20190402-22126-18k4m12.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. To see why this extension failed to compile, please check the mkmf.log which can be found here: /home/ec2-user/.rvm/gems/ruby-2.6.0/extensions/x86_64-linux/2.6.0/pg-0.20.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/pg-0.20.0 for inspection. Results logged to /home/ec2-user/.rvm/gems/ruby-2.6.0/extensions/x86_64-linux/2.6.0/pg-0.20.0/gem_make.out An error occurred while installing pg (0.20.0), and Bundler cannot continue. Make sure that `gem install pg -v '0.20.0' --source 'https://rubygems.org/'` succeeds before bundling.
5 gem install pg -v '0.20.0' --source 'https://rubygems.org/'
ERROR: Error installing pg: ERROR: Failed to build gem native extension. current directory: /home/ec2-user/.rvm/gems/ruby-2.6.0/gems/pg-0.20.0/ext /home/ec2-user/.rvm/rubies/ruby-2.6.0/bin/ruby -I /home/ec2-user/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0 -r ./siteconf20190402-22263-1l3b4s1.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.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/04/03 04:17