Home>
I want to achieve
  • I want to deploy a rails app on heroku
environment
  • Ruby 2.4.0

  • Ruby on Rails 5.1.6

  • bundler 2.0.1

  • Javascript runtime: node.js

current situation

In the vagrant environment, we check the startup of the rails server and the display on the browser.

Problem/error message
  • git push heroku masterWill fail to deploy
  • heroku buildpacks is set in node.js
Error code for git push heroku master after create without buildpacks
2019-10-03T21: 33: 48.503244 + 00: 00 heroku [web.1]: Starting process with command `bundle exec rails server -p 28886`
2019-10-03T21: 33: 50.666191 + 00: 00 heroku [web.1]: Process exited with status 1
2019-10-03T21: 33: 50.708819 + 00: 00 heroku [web.1]: State changed from starting to crashed
2019-10-03T21: 33: 50.712474 + 00: 00 heroku [web.1]: State changed from crashed to starting
2019-10-03T21: 33: 50.586012 + 00: 00 app [web.1]: /usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': Could not find'bundler' (2.0 .1) required by your /app/Gemfile.lock. (Gem :: GemNotFoundException)
2019-10-03T21: 33: 50.586039 + 00: 00 app [web.1]: To update to the lastest version installed on your system, run `bundle update --bundler`.
2019-10-03T21: 33: 50.586041 + 00: 00 app [web.1]: To install the missing version, run `gem install bundler: 2.0.1`
2019-10-03T21: 33: 50.586047 + 00: 00 app [web.1]: from /usr/lib/ruby/2.5.0/rubygems.rb:263:in `bin_path'
2019-10-03T21: 33: 50.586049 + 00: 00 app [web.1]: from/app/bin/bundle: 3: in `<main>'
Error code when buildpacks is git push heroku master after creating with heroku/ruby ​​specified
remote: ----->App not compatible with buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: remote:
remote:! Push failed
remote: Verifying deploy ...
remote: remote:
remote:! Push rejected to your-appname
What I tried
  • Change bundler version to 2.0.1 and regenerate Gemfile.lock

https://qiita.com/haru52/items/c2e062f6e1c7d4ecfe49

  • Fixed the Gemfile as a lowercase gemfile

https://qiita.com/leavescomic1/items/ca938f4637b125da5bcf

  • Deploy buildpacks with heroku/ruby

https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-ruby

https://dhtakeuti.hatenablog.com/entry/2018/12/11/142638

https://devcenter.heroku.com/articles/buildpacks#detection-failure

I am not able to solve it easily, so thank you.

  • Answer # 1

    https://qiita.com/haru52/items/c2e062f6e1c7d4ecfe49

    If you compare the quoted Heroku environment with the current Heroku environment, you'll notice that there is a difference.