RoRをherokuにデプロイ時にsqllite3でエラー

RoRをherokuにデプロイ時にsqllite3でエラー

RoRで作ったアプリをherokuにデプロイ $ git push heroku master したら以下のようなエラーが remote: An error occurred while installing sqlite3 (1.3.13), and Bundler cannot remote: continue remote: Make sure that `gem install sqlite3 -v '1.3.13'` succeeds before bundling. remote: remote: In Gemfile: remote: sqlite3 remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! Detected sqlite3 gem which is not supported on Heroku: remote: ! https://devcenter.heroku.com/articles/sqlite3 remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to glacial-tor-45483. remote: To https://git.heroku.com/glacial-tor-45483.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/glacial-tor-45483.git' gemfileの gem 'sqlite3' をコメントアウトして gem 'sqlite3', groups: %w(test development), require: false gem 'pg', groups: %w(production), require: false を挿入。 その後 bundle install としたら、postgresqlがインストールされていないと怒らえる。 An error occurred while installing pg (1.1.3), and Bundler cannot continue. Make sure that `gem install pg -v '1.1.3' --source 'https://rubygems.org/'` succeeds before bundling.

postgresqlをインストール $ brew install postgresql $ bundle install $ git add . $ git commit -m "コメント" $ git push heroku master 成功!

Page Top