Skip to content
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

Does jbundler work with the Heroku build pack? #36

Open
chriskilding opened this issue Jun 26, 2014 · 10 comments
Open

Does jbundler work with the Heroku build pack? #36

chriskilding opened this issue Jun 26, 2014 · 10 comments

Comments

@chriskilding
Copy link

I have some Java code which I'd like to interop with from a Jruby / Rails app via require java. Does jbundler play nicely with the Heroku build pack, in which case I can just drop a Jarfile in the root and have bundler do the rest? Or does Heroku still strip the jar files, in which case the separate gem + jar workaround is necessary?

@mkristian
Copy link
Owner

honestly I never tried this.

maybe as java app and using ruby-maven + jbundler + bundler to set it up, in the end you get a pom.xml with jar and gem dependencies.

let me have look at heroku later and give me a bit time to think ;)

@mkristian
Copy link
Owner

to have a rack application with Gemfile + Jarfile works along the lines of

https://github.com/jruby/jruby/wiki/Rack-Application-with-Ruby-Maven#heroku

see running app at http://frozen-garden-9530.herokuapp.com/

I did not dig into Rails which is a usually a bit more a challenge but it already can work as I mentioned it on the wiki.

please let me know if can help further. please also note that I will release jbunder + ruby-maven today with which I tested all this.

@mkristian
Copy link
Owner

@jkutner
Copy link

jkutner commented Jul 27, 2015

I've updated the guide with details on how to use the standard Ruby buildpack with JBundler:
https://github.com/jruby/jruby/wiki/Rack-Application-with-JBundler-on-Heroku#using-the-ruby-buildpack

@jeager
Copy link

jeager commented May 16, 2016

I am trying to deploy to heroku, I have a gem that uses jbundler to build dependencies (ruby-band). when I deploy do Heroku I keep getting this error:

Command failed with status (127): [sudo apt-get install maven2...]

Is it trying to install maven to get the dependencies?

@mkristian
Copy link
Owner

jbundler uses the ruby-maven gem which is basically a complete maven installation as a gem. so everythings works via rubygems and the system maven is NOT used at all.

what you see is:
https://github.com/arrigonialberto86/ruby-band/blob/master/ext/mkrf_conf.rb#L58

declaring jar-dependencies within the gemspec of ruby-band does work OK on heroku.

@jeager
Copy link

jeager commented May 17, 2016

so I should modify the mkrf_conf?

@mkristian
Copy link
Owner

@jeager ruby-band (mis)uses the extension feature of gems to install maven (which is not needed) via apt on linux and calls jbundler to install jars.

nothing I can "fix" from jbundler point of view. but nothing you can "fix" on your project. ruby-band better switch over to use jar-dependencies for its jars it wants to use. but this needs to be done on ruby-band side of things.

@jeager
Copy link

jeager commented May 17, 2016

@mkristian Thanks for the support, I think Im going to fork the gem and try to solve this problem, I think I need to change a few things on the gem side (because I really need this god damn gem). But your help was really useful, thanks :)

@mkristian
Copy link
Owner

@jeager please ping here if you need more help. there are plenty of ways to just get it to work with vendored jars or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants