Here goes step-by-step manual:
1. Download IronRuby 0.9.2 from here and install it.
3. Run RubyMine
4. Click Project Settings or press Ctrl + Alt + S:
![](http://3.bp.blogspot.com/_wdRLWvnftzI/SwTwng5WzcI/AAAAAAAAAKA/0aKW1xKnQnE/s320/RubyMine+Settings.png)
5. Navigate to 'Ruby SDK and Gems' left menu option:
![](http://2.bp.blogspot.com/_wdRLWvnftzI/SwT9Oo6teVI/AAAAAAAAALo/8MweAlrrwQY/s320/SDK+options.png)
6. Click 'Add SDK...' button:
![](http://1.bp.blogspot.com/_wdRLWvnftzI/SwT7TPO695I/AAAAAAAAAKI/ZTlkNLrcx7w/s320/Add+SDK.png)
7. Choose ir.exe in your IronRuby 0.9.2 installation folder:
![](http://4.bp.blogspot.com/_wdRLWvnftzI/SwT7TUQgn8I/AAAAAAAAAKQ/boHWVmBoLtQ/s320/Choose+IR.png)
8. That's it! We have IronRuby listed as Ruby SDK in RubyMine:
9. Let's try it in action! Close this window and create a new project:
10. Choose project location and 'Empty project' option - we don't need Rails at the moment:
11. Create a folder named 'src' and add a 'main.rb' file to it:
12. Write this code to editor (and feel the power of RubyMine's IntelliSense):
13. Click the arrow button and choose 'Edit Configurations' option:
![](http://1.bp.blogspot.com/_wdRLWvnftzI/SwT7UBam7WI/AAAAAAAAAKo/VFKcOayW1iU/s320/Edit+configurations.png)
14. Add new Ruby configuration:
![](http://2.bp.blogspot.com/_wdRLWvnftzI/SwT8H80gSTI/AAAAAAAAALI/jbZouxTuKdg/s320/New+configuration.png)
15. Name configuration and select our 'main.rb' file as executable script:
16. It's damn important to clear 'Ruby Arguments' field. Change this:
to this:
otherwise you'll get the 'can't convert NilClass into String (TypeError)' error:
17. Press OK and run our first program:
![](http://1.bp.blogspot.com/_wdRLWvnftzI/SwT9OUMxtbI/AAAAAAAAALY/eNNHwtgFsr0/s320/Run.png)
18. Here we go, our first IronRuby program running in RubyMine:
Isn't it wonderful? :)
1 comment:
Thanks. Works on IronRuby 1.0 RC1 too.
Post a Comment