Need help setting up RubyMine to work with JRuby 1.7.0-preview1

I've got a tiny sinatra app (w/Trinidad server) that runs fine in JRuby from the (Ubuntu 10.04) command line, but when I try and run it in RubyMine 4.0.3, I get all sorts of nasty error msgs (at bottom of post).  I have set RubyMine to use the exact same JRuby version and gemset as I do from the command line.  I'm guessing it's a config thing, but don't know where to look.  

Thank you

App:

require 'sinatra/base'

class MyApp < Sinatra::Base

  set :sessions, true

  set :foo, 'bar'

  set :server, 'trinidad'

  get '/' do

    'Hello world!'

  end

  run! if app_file == $0

end




Errors in RubyMine:

2012-06-06 18:33:07 INFO: No global web.xml found

2012-06-06 18:33:07 WARNING: Failed to scan [file:/home/jenko/Ruby/lib/bootstrap.jar] from classloader hierarchy

2012-06-06 18:33:07 WARNING: Failed to scan [file:/home/jenko/Ruby/lib/extensions.jar] from classloader hierarchy

2012-06-06 18:33:07 WARNING: Failed to scan [file:/home/jenko/Ruby/lib/util.jar] from classloader hierarchy

2012-06-06 18:33:07 WARNING: Failed to scan [file:/home/jenko/Ruby/lib/jdom.jar] from classloader hierarchy

2012-06-06 18:33:07 WARNING: Failed to scan [file:/home/jenko/Ruby/lib/log4j.jar] from classloader hierarchy

2012-06-06 18:33:07 WARNING: Failed to scan [file:/home/jenko/Ruby/lib/trove4j.jar] from classloader hierarchy

2012-06-06 18:33:07 WARNING: Failed to scan [file:/home/jenko/Ruby/lib/jna.jar] from classloader hierarchy

2012-06-06 18:33:07 SEVERE: Failed to process JAR found at URL [jar:file:/home/jenko/Ruby/lib/jna.jar!/] for ServletContainerInitializers for context with name [/]

2012-06-06 18:33:07 SEVERE: Marking this application unavailable due to previous error(s)

2012-06-06 18:33:08 WARNING: Failed to process JAR [jar:file:/home/jenko/Ruby/lib/bootstrap.jar!/] for TLD files

2012-06-06 18:33:08 WARNING: Failed to process JAR [jar:file:/home/jenko/Ruby/lib/extensions.jar!/] for TLD files

2012-06-06 18:33:08 WARNING: Failed to process JAR [jar:file:/home/jenko/Ruby/lib/util.jar!/] for TLD files

2012-06-06 18:33:08 WARNING: Failed to process JAR [jar:file:/home/jenko/Ruby/lib/jdom.jar!/] for TLD files

2012-06-06 18:33:08 WARNING: Failed to process JAR [jar:file:/home/jenko/Ruby/lib/log4j.jar!/] for TLD files

2012-06-06 18:33:08 WARNING: Failed to process JAR [jar:file:/home/jenko/Ruby/lib/trove4j.jar!/] for TLD files

2012-06-06 18:33:08 WARNING: Failed to process JAR [jar:file:/home/jenko/Ruby/lib/jna.jar!/] for TLD files

2012-06-06 18:33:08 SEVERE: Error getConfigured

2012-06-06 18:33:12 INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [4,790] milliseconds.

2012-06-06 18:33:12 SEVERE: Context [/] startup failed due to previous errors

2012-06-06 18:33:12 INFO: Starting ProtocolHandler ["http-bio-0.0.0.0-4567"]

2012-06-06 18:39:18 INFO: Pausing ProtocolHandler ["http-bio-0.0.0.0-4567"]

2012-06-06 18:39:19 INFO: Stopping service Tomcat

2012-06-06 18:39:19 INFO: The stop() method was called on component [StandardEngine[Tomcat].StandardHost[0.0.0.0].StandardContext[/]] after stop() had already been called. The second call will be ignored.

2012-06-06 18:39:19 INFO: Stopping ProtocolHandler ["http-bio-0.0.0.0-4567"]

2012-06-06 18:39:19 INFO: Destroying ProtocolHandler ["http-bio-0.0.0.0-4567"]

1 comment
Comment actions Permalink

Solution: added classpath to config via Run...Edit Configurations... Environment variables (button to the right), then in the dialog name: CLASSPATH value: path to java bin folder, in my case /usr/lib/jvm/jdk1.7.0/bin

Weird thing happened, tho, when I clicked "Ok", everything started to work.  When I went in just no (to document what I did in this post), my settings were gone, and now it says, in Environment variables "JRUBY_OPTS=-X+O"

Don't know why or how that happened, but it's still working, so I'm good.

0

Please sign in to leave a comment.