JRuby 1.7.19 remote server/SDK w/Vagrant (IntelliJ w/ Ruby Plugin)

Hello all,
I'm trying to configure IntelliJ to run a remote development server for my project. Here's a summary of what my project looks like:

Folder structure:
<project root>
     out - project output folder
     rails - rails application root
     src = Java source code

SDKs
Locally I have a 1.8 JDK and a JRuby 1.7.19 SDK.
I have also loaded a remote JRuby 1.7.19 SDK that uses my deployment server settings (Was having private key problems with Vagrant so this was just easier to setup)

Vagrant
     OS: CentOS 7
     Deployment path: /opt/my_project

Run/Debug Configuration
I created a Rails run configuration:
     IP: 127.0.0.1
     Port: 4000 (Vagrant is mapping 4000 to 4000 on the VM)
     Server args: blank
     Env: dev
     Env vars: blank
     Ruby args: -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
     Path mappings: blank
     Ruby SDK: Use other SDK - select my remote JRuby SDK
     Before launch: Make

When I try and run this configuration it just hangs in the console with:

/opt/my_project/.rbenv/versions/jruby-1.7.19/bin/jruby -J-cp C:\Programming\IntelliJ\my_project-dev\my_project\out\test\rails;C:\Programming\IntelliJ\my_project-dev\my_project\out\production\rails --1.9 -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' /opt/my_project/bin/rails server -b 127.0.0.1 -p 4000 -e development

until I press stop at which point it display:

/opt/my_project/.rbenv/versions/jruby-1.7.19/bin/jruby -J-cp C:\Programming\IntelliJ\my_project-dev\my_project\out\test\rails;C:\Programming\IntelliJ\my_project-dev\my_project\out\production\rails --1.9 -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' /opt/my_project/bin/rails server -b 127.0.0.1 -p 4000 -e development
^Cbash: C:ProgrammingIntelliJmy_project-devmy_projectoutproductionrails: command not found...


Process finished with exit code 127

So the problem seems to lie with the classpath argument that IntelliJ is appending to the jruby command, but I can't seem to find a way to modify or remove the setting. Any ideas on what I may be doing wrong?

Thanks!

1 comment
Comment actions Permalink

I was able to finally fix this. For those who may have a similar situation, this is what I did:

  1. Open Project Structure
  2. Click Modules
  3. Highlight the module for the Rails application
  4. Click Paths
  5. By default, Inherit project compile output path is selected, switch that to Use module compile output path and change the values to relative paths (e.g. ../out/production/rails)
  6. Click OK


After these changes, running resulted in this command:

/opt/my_project/.rbenv/versions/jruby-1.7.19/bin/jruby --1.9 -e '$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' /opt/my_project/bin/rails server -b 127.0.0.1 -p 4000 -e development

0

Please sign in to leave a comment.