Sunday, November 9, 2008

Gem 'ruby-debug-ide' not found in IntelliJ under Kubuntu

A while ago when IntelliJ got the ability to debug ruby scripts I tried to set it up under Kubuntu what turned out to be not very straightforward. Firstly, there must be ruby-debug-ide gem installed. It seems to be not a big deal? Right, it’s not a big deal to type

gem install ruby-debug-ide

But with default Kubuntu installation (8.4 at that time) it would fail when building some system dependent sources. Thanks to Igor Stepin, who suggested installing build-essentials package, I got around this problem.

The second problem was that even though ruby-debug-ide was installed IntelliJ kept saying it cannot find it. The solution is also not very tricky: you should change “Gem bin directory” in JDK setting from “/usr/bin” (which is default) to “/var/lib/gems/1.8/bin”.

The same applies to debugging in RubyMine. I didn’t manage to find SDK configuration dialog in 435 build and, therefore, fixed configuration through xml configs by copying part of IntelliJ’s jdk.table.xml to ~/.RubyMine10/config/options/jdk.table.xml (text configurations rule!).

3 comments:

Romeo said...

Hi,

This may be incorrect if your gems executable scripts ("spec", "rails", "rake", "rdebug-ide") are located in two directories (e.g. /usr/bin, /var/lib/...) because IDEA will look for such scripts only in "Gem bin directory". We will fix this problem in the nearest future. More correct solution - to add symbolic links(or copy) such missing scripts to one directory(e.g. /usr/bin or /var/lib/gems/1.8/bin).

See issue http://www.jetbrains.net/jira/browse/RUBY-2253
---
Best regards,
Roman Chernyatchik

Romeo said...

Also feel free to report your feedback/problems to our forum - http://www.intellij.net/forums/forum.jspa?forumID=75

---
Best regards,
Roman Chernyatchik

Dmitry Kandalov said...

Thanks. I should've asked on forum first.

I also created http://www.jetbrains.net/jira/browse/RUBY-2252 which is probably obsolete now that there is 2253.