Debugging Rubymine extensions

I have registered new editor action (using camel_to_snake_case.rb as an example).
Inside the action bloc, I delegate to the outside script (which was required prior to that).
However, when  I try toapply registered action in editor, it fails silently.

The outside script works perfectly (outside of Rubymine), it is well tested.

If I make it trivial (say, just return fixed string), my editor action works.

So, I confirmed that the editor action properly loads and accesses the outside script,
and the script works outside of Rubymine. The problem seems to be the combination
of Rubymine and my scripts's actions. But I cannot get any idea what may be the
problem, since editor action just fails silently.

Is there any way to get some information about WHY and HOW the action fails inside Rubymine?
Any pointers would be greatly appreciated.

Regards, Arvicco

4 comments

Arvicco wrote:

I have registered new editor action (using camel_to_snake_case.rb as an example).
Inside the action bloc, I delegate to the outside script (which was required prior to that).
However, when  I try toapply registered action in editor, it fails silently.

The outside script works perfectly (outside of Rubymine), it is well tested.

If I make it trivial (say, just return fixed string), my editor action works.

So, I confirmed that the editor action properly loads and accesses the outside script,
and the script works outside of Rubymine. The problem seems to be the combination
of Rubymine and my scripts's actions. But I cannot get any idea what may be the
problem, since editor action just fails silently. :(

Is there any way to get some information about WHY and HOW the action fails inside Rubymine?
Any pointers would be greatly appreciated.

Regards, Arvicco

Hello,

Does RubyMine show blinking red exclamation sign in right part of RubyMine status bar? Also you can take a look on RubyMine log files (see http://www.jetbrains.net/devnet/docs/DOC-1153).


I think the easiest way is to use debug output inside your RubyMine extension/external ruby script. Just launch RubyMine from console and I will see all debug output in it.

0

Roman,

Thanks for your reply, looking into system log helped me to identify the issue. It is gem-related, seems like Rubymine's loadpath does not include gems installed in the system...

Regards, Arvicco

0

Yes, RubyMine launches extensions using bundled JRuby interpreter. Probably you may extend gem paths in your RubyMine extension and point on some folder with jruby compatible gems.

0

Sure, that's what I'm doing. Thanks for help, Roman!

0

Please sign in to leave a comment.