These are chat archives for jruby-gradle/jruby-gradle-plugin

11th
May 2017
Christian Meier
@mkristian
May 11 2017 05:54
@amiracam the plugin does not use the jruby default GEM_HOME as all gems are installed in an isolated manner inside the porjects build directory. that is why you see it set inside this gradle.rb script. you also can append this new location to GEM_PATH. the GEM_HOME is where new gems get installed and GEM_PATH can have colon separated paths to several locations. rubygems will find any gem located on GEM_HOME and GEM_PATH
amiracam
@amiracam
May 11 2017 10:32
@mkristian, yes of course , that is clear from the output that is generated inside the build folder, what I was suggesting that if it did i.e. do both, then effectively, IDEA would be able to find the Gems, WRT to GEM_HOME, IDEA must be overriding these since it can only find Gems installed to the current SDK for the project. Also does not RVM change these globals when one performs rvm use <rubySDK>, unfortunately IDEA does not seemingly support the notion of something similar to a GEM_PATH that I can tell for the registered Ruby SDKs, not comfortable with relying on .profile settings, I want the set of GEMS to be specific to the Project Ruby SDK I'm using, also apparently from granted a dated RubyMine support post, one may actually need to start IDEA from the console to get these settings to stick , see here:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206088049-Ruby-Gem-Location
I understand that the Jruby-Gradle plugin was not built to be integrated into IDEA , just hoping that it will one day and thus allow me what I can do now with Groovy and Kotlin i.e. to drive a polyglot project where I can use Gradle to manage the dependencies , yes my development relies on my IDE of choice but I believe that their support of Gradle is what one would expect, I'll inquire with JetBrains perhaps there's a way of adding the .build/gems path to the project that is just escaping me
Christian Meier
@mkristian
May 11 2017 11:24
@amiracam each ruby installation comes with its default GEM_HOME and GEM_PATH set. rvm does do something with that, not sure what exactly. rbenv just let the installation use their defaults. jruby-gradle does overwrite the defaults altogether by passing them into jruby wherever we execute jruby. there was an undocumented jruby feature to set the gem.path via system properties, but it did not work for me (need to fiddle a bit more though or fix it). but can you pass environment variables to the ruby-sdk ?
amiracam
@amiracam
May 11 2017 11:36
@mkristian hmmm? for Run Configurations u can, but don't know of a way of passing them so that intellisense feature etc are aware,I just considered the notion of creating rvm gem sets from the jruby-gradle plugin output, since IDEA can be configured to use a specific gemset under a specific RVM ruby sdk, this would be better than just installing into the default gemset, I did put in a support request to JetBrains perhaps some ideas are generated from that, I'll look into your question more fully, have to get ready for the commute, thank you for considering this use case