ActiveState Community

can't get Komodo 5.2.1 to use ruby 1.9.1 install on OS X

Posted by jhancock on 2009-10-27 11:13

I'm experimenting with ruby debugging support on Komodo 5.2.1. Using the ruby_tutorial project to practice with I cannot get Komodo to use ruby 1.9.1 on OS X (10.5.8). Komodo is using Apple's pre-installed 1.8.6 instead.

I have ruby 1.9.1 installed in the simplest and least destructive way I could find. I installed ruby in /usr/local/ruby-191-p243 and link /usr/local/ruby to that. Then I ensure /user/local/ruby/bin is at the front of my PATH. This gives me a nice separate ruby and gems environment without resorting to name suffixes, e.g. ruby19.

So, how do I get Komodo to use this? I've added a line "puts RUBY_VERSION" to the beginning of menagerie.rb. When I click the run button menagerie.rb file, I get the Debug Options dialog. I press enter and it works as expected and prints "1.8.6" as the first line of output.

I would expect to easily change or override a setting to get Komodo to use my ruby 1.9.1, I've tried this:
From the Debug Options dialog "User Environment Variables" list, add
PATH to contain /usr/local/ruby/bin:/usr/local/bin:/usr/bin:/usr/sbin

This method does not work. Any ideas? thanks

ericp | Tue, 2009-10-27 14:15

Load up the Preferences from the Application menu,
and go to [Languages|Ruby]. The 'use this interpreter'
is most likely pointing to a Ruby 1.8.6 interpreter,
and that's the one Komodo is using. If you point
it at /usr/local/ruby-191-p243/bin/ruby, that should
get you running Ruby 1.9.1

Don't forget to run `gem install ruby-debug-base` with
a 1.9.1 gem if you plan on using the debugger.

- Eric

jhancock | Tue, 2009-10-27 14:35

The Preferences for Languages|Ruby has a drop down with label "Use this interpreter". The default selection is "Find on Path". The other option is "/usr/bin/ruby". I cannot add a selection to point to "/usr/local/ruby/bin/ruby" as the selection dialog does not let me access directories such as /usr, This selection dialog is hiding them from me even though my Finder options for normal use are set to show all files and directories.

So I can't change the interpreter from Preferences->Languages|Ruby. Also, In my first message, I show that I am setting the PATH but this isn't working and seems like a bug to me. Obviously "Find on Path" in the preferences isn't using the PATH variable I'm overwriting in my Debug Config. I can try linking /usr/bin/ruby to my real ruby 1.9.1, but this is a terrible hack and may have side effects.

Every few months for more than a year, I give Komodo IDE a try in the hopes that I can have a good debugger fro ruby. Every time I try, it fails me, usually around config issues like this one. It leaves me puzzled as to how internal devs at ActiveState actually test things such as ruby 1.9.1 debugging on OS X. Is this actually a tested scenario?

ericp | Tue, 2009-10-27 15:02

I don't know why Apple had to make that dialog so unusable, but they did.

I've set the same default for the Finder that you have, but unfortunately
it doesn't affect the standard openFile dialog.

- Eric