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.
请先登录再写评论。
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
RubyMine almost doesn't have any special support for Iron Ruby. But we also look for "igem" script in Iron Ruby bin directory. We will check integration with gem manager today or tomorrow.
P.S: On Mac RM doesn't work with Iron Ruby because RM should launch ir interpreter using Mono framework.
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
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
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
We can also move this hardcoded flags into configuration file.