New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`$ heroku config:set RUBYOPT` breaks builds #847

Closed
schneems opened this Issue Dec 28, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@schneems
Copy link
Contributor

schneems commented Dec 28, 2018

Internal ticket: https://support.heroku.com/tickets/666174

If you set:

$ heroku config:set RUBYOT=--jit

Then this will be a global value so when the buildpack attempts to detect ruby version by running:

$ bundle platform --ruby

It is executed with the RUBYOPT set. Since the version of Ruby the buildpack executes does not have --jit it fails:

-----> Ruby app detected
-----> Compiling Ruby/Rails
 !
 !     There was an error parsing your Gemfile, we cannot continue
 !     ruby: invalid option --jit  (-h will show valid options) (RuntimeError)
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

Workaround

If you're seeing this in your app please unset your RUBYOPT:

$ heroku config:unset RUBYOPT

Then apply it individually to any entries in your Procfile:

web: RUBYOPT=--jit bundle exec rails server
#...

Future

The easiest thing to do would be to add this to our denylist of env vars that cannot be used at build time.

schneems added a commit that referenced this issue Dec 28, 2018

Close #847 Allows apps to enable `RUBYOPT=--jit`
If you set:

```
$ heroku config:set RUBYOT=--jit
```

Then this will be a global value so when the buildpack attempts to detect ruby version by running:

```
$ bundle platform --ruby
```

It is executed with the RUBYOPT set. Since the version of Ruby the buildpack executes does not have `--jit` it fails:

```
-----> Ruby app detected
-----> Compiling Ruby/Rails
 !
 !     There was an error parsing your Gemfile, we cannot continue
 !     ruby: invalid option --jit  (-h will show valid options) (RuntimeError)
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed
```

@schneems schneems closed this in 16795ef Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment