Skip to content

Commit

Permalink
Close #847 Allow apps to enable RUBYOPT=--jit
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
schneems committed Jan 10, 2019
1 parent cef4561 commit 16795ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Master

* Allow apps to enable `RUBYOPT=--jit` (https:/heroku/heroku-buildpack-ruby/pull/848)

## v197 (12/18/2018)

* Upgrade node version (https:/heroku/heroku-buildpack-ruby/pull/831)
Expand Down
2 changes: 1 addition & 1 deletion lib/language_pack/shell_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def env(var)
end

def self.blacklist?(key)
%w(PATH GEM_PATH GEM_HOME GIT_DIR JRUBY_OPTS JAVA_OPTS JAVA_TOOL_OPTIONS).include?(key)
%w(PATH GEM_PATH GEM_HOME GIT_DIR JRUBY_OPTS JAVA_OPTS JAVA_TOOL_OPTIONS RUBYOPT).include?(key)
end

def self.initialize_env(path)
Expand Down

0 comments on commit 16795ef

Please sign in to comment.