heroku-buildpack-ruby: Error running rake or release tasks `ruby: bad interpreter: No such file or directory`
It works on https://github.com/heroku/heroku-buildpack-ruby.git#v215. The app is soon to be retired, so locking down the deploy stack is fine for us, but this could be an issue for others.
On master we get an error like:
remote: -----> Detecting rake tasks
remote:
remote: !
remote: ! Could not detect rake tasks
remote: ! ensure you can run `$ bundle exec rake -P` against your app
remote: ! and using the production group of your Gemfile.
remote: ! bash: /tmp/build_FOO/bin/rake: /app/vendor/ruby-2.3.8/bin/ruby: bad interpreter: No such file or directory
remote: !
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (18 by maintainers)
Commits related to this issue
- Failing test for #1005 The files in `bin/` such as `bin/rake` are come from the compiled binaries. For some versions of Ruby they start with a binstub that looks like this: ``` $ cd ~/Downloads/ruby... — committed to heroku/heroku-buildpack-ruby by schneems 4 years ago
- Document v216 rollback in git This deploy was rolled back due to #1005 — committed to heroku/heroku-buildpack-ruby by schneems 4 years ago
- Handle binary binstubs (#1021) * Revert "Merge pull request #1020 from heroku/schneems/revert-bad-shebang-check" This reverts commit da07466ec623aa4312c9f07df1777f93b780b156, reversing changes ma... — committed to heroku/heroku-buildpack-ruby by schneems 4 years ago
- Failing test for #1005 The files in `bin/` such as `bin/rake` are come from the compiled binaries. For some versions of Ruby they start with a binstub that looks like this: ``` $ cd ~/Downloads/ruby... — committed to heroku/heroku-buildpack-ruby by schneems 4 years ago
- [close #1029] Remove default bin/rake binstub After v216 was released there were several failures reported in #1029 and #1005 these are both related to `bin/` being put first on the path consistently... — committed to heroku/heroku-buildpack-ruby by schneems 4 years ago
- [close #1029] Remove default bin/rake binstub (#1031) After v216 was released there were several failures reported in #1029 and #1005 these are both related to `bin/` being put first on the path cons... — committed to heroku/heroku-buildpack-ruby by schneems 4 years ago
Looking into the issue more it seems that the problem is limited to Ruby 2.2 and Ruby
2.32.4 binaries. I’m going to write some tooling to verify this is true. If that’s the case then the best solution will be to re-compile which won’t require a buildpack change.Edit: Turns out it.s Ruby 2.3 and 2.4. You can see a list below in another of my comments.
Correct. I’ve rolled this out on Monday and I’ve not gotten a single support ticke about it. Everything looks stable.
I just wanted to jump in here. I’m also having the exact same error as @joakimk when trying to deploy to Heroku using the default buildpack release. Also on a Ruby 2.3.8 application.
UPDATE: Manually using the v215 tag for this repo for the ruby buildpack works around the bug.
Hi all, also wanted to jump in and say that I’m having the exact same error with v216. My app is using Ruby 2.4.9. I can confirm that manually setting v215 works around the issue for now. https://github.com/heroku/heroku-buildpack-ruby.git#v215
It looks like my change doesn’t play well with certain versions of Ruby 2.6. I recommend people upgrade to 2.6.6 if they’re getting this failure mode:
@joakimk it looks like your issue is different since you’re using an older version of Ruby. Are you able to open a ticket? I would like to investigate your failure mode.