adamjmurray/jruby_for_max-examples

ruby gems

Closed this issue · 8 comments

the answer is probably pretty obvious, but isn't yet for me.
What is the best practice for including ruby gems? As i understand it, I need to check to see it is jruby compatible, but I haven't been able to include any ruby gems.

Can you shed some light on approaching using ruby gems? (not ruby standard libraries, i see that those work)

Take a look at this page and see if it helps: https://github.com/adamjmurray/jruby_for_max/wiki/FAQ

Additionally, I have a new beta version coming up that uses bundler and has an integrated gem management Max patcher with a GUI for installing gems. It's much easier than the approach described in the FAQ. Would you like to help beta test it?

lol, derpa derp, pays to read, thanks Adam. I would be totally stoked to beta test this. Yes, definitely. Now I am very excited to use this 👍

Hey Adam. Pretty sure I've followed the directions to the T and had zero luck getting it to load gems using Option #2. I initially thought option #1 would work well, but as i'm not sure how to add a $load_path to Jruby i've had no luck on that either.

Sorry for the noob questions :) :)

Hi, sorry, I've been travelling and can't help you with this right at the moment. Hopefully I can give more guidance next week. Once you've installed JRuby and installed gems that way (see the 4 steps above the 3 options), make sure you can run a simple Ruby script directly with JRuby (not Max) that uses the gem. Maybe something is wrong with the basic setup? If you are stuck on that part, you can try asking for help on stackoverflow.com.

If that seems to work, maybe give option 3 a try?

Myself and some others have definitely gotten this process to work. It's probably something simple you're missing (or maybe my documentation needs improvement)...

It might help to know if you are on Windows or OS X, and which version of the OS and Max you are using.

Cool. I'll just start over. then again, if that bundler beta is coming up, i'd love to get that a try

I managed to get it to work with absolute paths, though yeah I needed to do some mcguivering in the code.

Hey, in case you are not aware, I released a new version that has a gem management patcher accessible via the help patch.

Get it here: http://compusition.com/web/software/maxmsp/jruby_for_max

I think there may be some issues with managing gem dependencies automatically, but if you know all the gems that you need, then you should be able to install them more easily now.

Thanks adam, I'll muster a new project so as to try it out