LoginSignup
1
0

More than 3 years have passed since last update.

herokuにデプロイするときの単純ミス

Posted at

Railsで作成したアプリをHerokuでデプロイしようとした時のミス
スクリーンショット (318).png

terminal.
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:  !

結論

Gitリポジトリにデプロイするためgemを変更した修正を上げていなかった。。。
githubのリポジトリからデータがHerokuに送られているため、githubのコードを更新しなければならない!!!!!(そう言えばそうだった笑)

terminal.

$ git add *
$ git commit -m 'add to gemfile(メッセージは何でもいい)'
$ git push
$ git push heroku master

解決方法

HerokuにデプロイするときはたいていRails Tutorialを参考にしています。
Rails Tutorial "1.5デプロイする"

Gemfile.

group :development, :test do
  gem 'sqlite3', '1.3.13'
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :production do
  gem 'pg', '0.20.0'
end

・gem 'sqlite3'
・gem 'pg'
を挿入してgit push する!

terminal.

remote: Verifying deploy... done.

無事デプロイできました!

簡単なミスしないようにしたい。。。:sob:
これからも頑張ろう!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0