前提・実現したいこと
Ruby on Railsにてブログアプリを作成しました
HerokuにてRailsアプリを公開したい
公開方法なは下記のリンクを参考にしました。
リンク内容
発生している問題・エラーメッセージ
リンクを参考に
gem
1コード 2gem 'sqlite3', group: :development 3gem 'pg', group: :production
と記述しbundle installを実行しました。
current directory: /Users/kojin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/pg-1.2.3/ext /Users/kojin/.rbenv/versions/2.5.1/bin/ruby -I /Users/kojin/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0 -r ./siteconf20201117-19482-jon8rf.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. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/kojin/.rbenv/versions/2.5.1/bin/$(RUBY_BASE_NAME) --with-pg --without-pg --enable-windows-cross --disable-windows-cross --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users?kojin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-19/2.5.0/pg-1.2.3/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/kojin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/pg-1.2.3 for inspection. Results logged to /Users/kojin/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-19/2.5.0/pg-1.2.3/gem_make.out An error occurred while installing pg (1.2.3), and Bundler cannot continue. Make sure that `gem install pg -v '1.2.3' --source 'https://rubygems.org/'` succeeds before bundling.
該当するソースコード
gem
1 2ruby '2.5.1' 3 4# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 5gem 'rails', '~> 6.0.3', '>= 6.0.3.4' 6# Use sqlite3 as the database for Active Record 7gem 'sqlite3', '~> 1.4', group: :development 8gem 'pg', group: :production 9# Use Puma as the app server 10gem 'puma', '~> 4.1' 11# Use SCSS for stylesheets 12gem 'sass-rails', '>= 6' 13# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker 14gem 'webpacker', '~> 4.0' 15# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 16gem 'turbolinks', '~> 5' 17# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 18gem 'jbuilder', '~> 2.7' 19# Use Redis adapter to run Action Cable in production 20# gem 'redis', '~> 4.0' 21# Use Active Model has_secure_password 22# gem 'bcrypt', '~> 3.1.7' 23 24# Use Active Storage variant 25# gem 'image_processing', '~> 1.2' 26 27# Reduces boot times through caching; required in config/boot.rb 28gem 'bootsnap', '>= 1.4.2', require: false 29 30group :development, :test do 31 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 32 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 33end 34 35group :development do 36 # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 37 gem 'web-console', '>= 3.3.0' 38 gem 'listen', '~> 3.2' 39 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 40 gem 'spring' 41 gem 'spring-watcher-listen', '~> 2.0.0' 42end 43 44group :test do 45 # Adds support for Capybara system testing and selenium driver 46 gem 'capybara', '>= 2.15' 47 gem 'selenium-webdriver' 48 # Easy installation and use of web drivers to run system tests with browsers 49 gem 'webdrivers' 50end 51 52# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 53gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 54gem 'actiontext' 55gem 'image_processing', '~> 1.2' 56gem 'haml-rails' 57gem 'bourbon' 58gem 'devise' 59gem 'jquery-rails' 60gem 'font-awesome-sass'
試したこと(仮説)
An error occurred while installing pg (1.2.3), and Bundler cannot continue.
エラー内容で調べました。
リンク内容
上記のリンクを参照しました。
補足
初心者で言葉足らずで申し訳ありませんが、ご教示頂けたらと思い
質問させて頂きました。宜しくお願い致します。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/11/17 06:10 編集