I'm completely new to IntelliJ, coming from a mixed Eclipse+RubyMine environment, but evaluating IntelliJ for it's good Ruby integration.
I'm trying to get a really simple example working with JRuby integration in a Java project. I'm using IntelliJ 13.0.2 with latest Ruby plugin. I have a simple JUnit test case which basically just calls into JRuby:
String rubyFile = "test_ruby.rb"
ScriptingContainer container = new ScriptingContainer();
logger.info("Done with ScripLet");
My project uses Maven, and everything works fine from command line running "mvn test".
But if I try to execute the test case from within IntelliJ, it fails immediately:
2014-02-12 09:37:51,094 INFO [main] (TestJRubyBinding.test) Calling ScriptLet
org.jruby.exceptions.RaiseException: (TypeError) can't convert nil into String
Looking into the config_file.rb, the offending statement seems to be:
SYSTEM_WIDE_CONFIG_FILE = File.join system_config_path, 'gemrc'
I.e. system_config_path is nil, which indicates some kind of JRuby configuration problem in the way IntelliJ initializes JRuby. Same code works fine from command line and from within Eclipse.
I have checked all the obvious places, the execution uses the right Ruby SDK etc, but something very basic seems to be wrong.
Any ideas on how to setup IntelliJ to get this working?