質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Haml

Haml(HTML abstraction markup language)は、HTML/XHTMLを効率的に記述するためのマークアップ言語および記法です。

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Sass

Sassは、プログラミング風のコードでCSSを生成できるスタイルシート言語です。 scss ファイルを、変換(コンパイル)してCSSファイルを作成します。

Q&A

1回答

695閲覧

Ruby on Rails6 heroku用のGemをインストールしたい

ken1203

総合スコア24

Haml

Haml(HTML abstraction markup language)は、HTML/XHTMLを効率的に記述するためのマークアップ言語および記法です。

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Sass

Sassは、プログラミング風のコードでCSSを生成できるスタイルシート言語です。 scss ファイルを、変換(コンパイル)してCSSファイルを作成します。

0グッド

1クリップ

投稿2020/11/17 04:48

前提・実現したいこと

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.
エラー内容で調べました。
リンク内容
上記のリンクを参照しました。

補足

初心者で言葉足らずで申し訳ありませんが、ご教示頂けたらと思い
質問させて頂きました。宜しくお願い致します。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

リンクを参考に

するべきではありません。「本番とローカルで別なデータベースを使う」というのは、トラブルの種を自ら準備するようなものです。

HerokuでPostgreSQLを使うなら、ローカル環境もPostgreSQLで統一することを、強くおすすめします。

投稿2020/11/17 05:24

maisumakun

総合スコア145183

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

ken1203

2020/11/17 06:10 編集

返信ありがとうございます! ローカル環境もPostgreSQLに統一した方が良いんですね! 一度、試してみます!! ありがとうございます!!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問