6 Replies Last post: Oct 28, 2009 11:23 AM by Oleg Shpynov  
Roman.Chernyatchik  JetBrains 1,448 posts since
Sep 18, 2007
Currently Being Moderated

May 2, 2009 7:24 PM

Using IronRuby/MacRuby with RubyMine

Hi guys,

 

RubyMine 1.0 checks that interpreter executable file name starts with "ruby" prefix, otherwise RM will show error message "The selected file is not a valid home for RubySDK" (RM | File | Settings | Ruby SDK and Gems | Add Sdk..). So

* for MacRuby Ruby SDK you should create symbolic link "rubymac" to "/usr/local/bin/macruby"

* for IronRuby have a look at instructions at http://flanders.co.nz/2009/05/02/using-ironruby-with-rubymine/ (thanks to Ivan Porto Carrero)

 

P.S: Don't forget that RubyMine 1.0 supports only Ruby 1.8.x language version so it will highlight new features of 1.9.x syntax with errors.

Charles Strahan Newbie 3 posts since
Oct 19, 2009
Currently Being Moderated
Oct 19, 2009 8:47 PM in response to: Roman.Chernyatchik
Re: Using IronRuby/MacRuby with RubyMine

Hello Roman,

 

RubyMine beta 2.0 appears to work "out of the box" with IronRuby 0.9.1 - all I had to do was configure my SDK settings such that the ruby interpreter path was set to "C:\IronRuby\bin\ir.exe", and then in the "Run/Debug Configurations", set the Ruby arguments to "-e STDOUT.sync=true;STDERR.sync=true;load($0)".

 

The one thing that I can't figure out is how to get Rubygems working (the IDE always displays the "Rubygems not installed for this SDK" message).  Do you have any suggestions?  I started a discussion over here, before I found out about this thread.  Perhaps RubyGems looks for batch files that are either in different locations or perhaps named differently in the IronRuby?

 

 

Thanks!

 

-Charles

Oleg Shpynov JetBrains 1,171 posts since
Nov 6, 2007
Currently Being Moderated
Oct 22, 2009 8:51 PM in response to: Charles Strahan
Re: Using IronRuby/MacRuby with RubyMine

In addition to Roman:

We have some plans to move hardcoded logic of names conventions into some config file (most likely YAML will fit well) to make it easier to make RubyMine work with custom configurations.

http://youtrack.jetbrains.net/issue/RUBY-5242

Dennis Ushakov JetBrains 227 posts since
Sep 10, 2008
Currently Being Moderated
Oct 22, 2009 9:40 PM in response to: Charles Strahan
Re: Using IronRuby/MacRuby with RubyMine

The problem was in IronRuby not supporting -x flag for main executable which is used by RubyMine to run MRI gem script on windows. I've fixed this problem

Charles Strahan Newbie 3 posts since
Oct 19, 2009
Currently Being Moderated
Oct 28, 2009 6:05 AM in response to: Dennis Ushakov
Re: Using IronRuby/MacRuby with RubyMine

Thanks guys!

 

It was awesome to see your feedback so soon after posting my question.

I don't know if it's feasible to incorporate full IronRuby support by version 2's release date, but if you could, I'm positive that you'd have plenty of loyal IronRuby users .

(... perhaps you could start a poll, and compare prospective IronRuby users vs MRI - that would be interesting to see ...)

 

 

Regardless, thank you all for your awesome work!


-Charles

Oleg Shpynov JetBrains 1,171 posts since
Nov 6, 2007
Currently Being Moderated
Oct 28, 2009 11:23 AM in response to: Dennis Ushakov
Re: Using IronRuby/MacRuby with RubyMine

We can also move this hardcoded flags into configuration file.

More Like This

  • Retrieving data ...