Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Error uploading application to Heroku #1742

pboettcher opened this Issue · 3 comments

2 participants


The application was a former JRuby application which used several JARs. Now it is developed in Ruby and loads these JARs via Ruby Java Bridge (RJB).

Here is the uploading log.

$ git push heroku master
Counting objects: 3434, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1396/1396), done.
Writing objects: 100% (3434/3434), 39.65 MiB | 186 KiB/s, done.
Total 3434 (delta 1941), reused 3399 (delta 1924)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.1.rc.7
Running: bundle install --without development:test --path vendor/bundle -
-binstubs bin/
Fetching gem metadata from
Installing rake (
Installing abstract (1.0.0)
Installing activesupport (3.0.4)
Installing builder (2.1.2)
Installing i18n (0.6.0)
Installing activemodel (3.0.4)
Installing erubis (2.6.6)
Installing rack (1.2.5)
Installing rack-mount (0.6.14)
Installing rack-test (0.5.7)
Installing tzinfo (0.3.32)
Installing actionpack (3.0.4)
Installing mime-types (1.17.2)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.2.15)
Installing actionmailer (3.0.4)
Installing arel (2.0.10)
Installing activerecord (3.0.4)
Installing activeresource (3.0.4)
Using bundler (1.1.rc.7)
Installing jruby-jars (1.6.7)
Installing jruby-rack (1.1.4)
Installing json (1.6.5) with native extensions
Installing mysql2 (0.2.18) with native extensions
Installing thor (0.14.6)
Installing railties (3.0.4)
Installing rails (3.0.4)
Installing rjb (1.3.9) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at so that we can fix it. Thanks!
/usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/local/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:

': JAVA_HOME is not set. (RuntimeError)
Gem files will remain installed in /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/rjb-1.3.9 for inspection.
Results logged to /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/rjb-1.3.9/ext/gem_make.out
from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:486:in block in build_extensions'
from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in
from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in build_extensions'
from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:198:in
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/source.rb:90:in block in install'
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:82:in
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/source.rb:89:in install'
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:73:in
block in install_gem_from_spec'
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:97:in with_build_args'
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:72:in
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:56:in block in run'
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:55:in
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:12:in install'
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/cli.rb:220:in
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/task.rb:22:in run'
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/invocation.rb:118:in
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor.rb:263:in dispatch'
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/base.rb:386:in
from /tmp/build_3dvp2fhi9hhq4/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/bin/bundle:13:in <top (required)>'
from vendor/bundle/ruby/1.9.1/bin/bundle:19:in
from vendor/bundle/ruby/1.9.1/bin/bundle:19:in `'
! Failed to install gems via Bundler.
! Heroku push rejected, failed to compile Ruby/rails app

! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ''


It would appear that you cannot use rjb on that stack on Heroku. Have you considered using JRuby instead?

@radar radar closed this

In a beginning of this issue I wrote that I moved this application from JRuby. And believe me, it was not without a reason.


Ok. This does seem to be an issue with regards to rjb and Heroku and not Bundler still though. You'll need to find a way around that, which may involve using a system that's not Heroku.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.