前提・実現したいこと
rails5で作ったものをHerokuにデプロイしたいです!
発生している問題・エラーメッセージ
heroku run rails db:migrateをすると、
Running rails db:migrate on ⬢ bookchange-090... up, run.8258 (Free) bash: rails: command not found
というエラーが出てしまいます。
Gemfie , database.yml
Gemfie
group :production do gem 'pg', '0.21.0' end
database.yml
production: adapter: postgresql encoding: unicode pool: 5 database: message-board_production username: message-board password: <%= ENV['MESSAGE-BOARD_DATABASE_PASSWORD'] %>
のようになっています。
試したこと
git push heroku master をすると、
Counting objects: 228, done. Compressing objects: 100% (202/202), done. Writing objects: 100% (228/228), 678.53 KiB | 11.90 MiB/s, done. Total 228 (delta 70), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.4.5 remote: -----> Installing dependencies using bundler 1.15.2 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. remote: You are trying to install in deployment mode after changing remote: your Gemfile. Run `bundle install` elsewhere and add the remote: updated Gemfile.lock to version control. remote: remote: The dependencies in your gemfile changed remote: remote: You have added to the Gemfile: remote: * pg (= 0.21.0) remote: remote: You have deleted from the Gemfile: remote: * pg (= 0.20.0) remote: Bundler Output: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. remote: You are trying to install in deployment mode after changing remote: your Gemfile. Run `bundle install` elsewhere and add the remote: updated Gemfile.lock to version control. remote: remote: The dependencies in your gemfile changed remote: remote: You have added to the Gemfile: remote: * pg (= 0.21.0) remote: remote: You have deleted from the Gemfile: remote: * pg (= 0.20.0) remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to bookchange-090. remote: To https://git.heroku.com/bookchange-090.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/bookchange-090.git'
と出てしまいます。
どなたかお詳しい方、ぜひご教授ください!
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。