Ruby 2.0 Beta Issue: Error installing ruby-debug-ide19

Be gentle, I'm a ruby/rails newb.

I've installed the latest preview version of Ruby 1.9 and Rails as well. I successfully followed along with one of the movies from the RubyMine page and created the Notebook sample.

However I can't get into debug mode. I get prompted to install the ruby-debug-ide19 gem and it fails to install with the message: ruby-debug-ide19(0.4.11): Error installing ruby-debug-ide19: ERROR: Failed to build gem native extension. ...

Any help would be appreciated.

BTW I'm really enjoying the IDE and Ruby on Rails in general. I'm a Resharper user and its real nice to have all the features I'm used to using available.

14 comments
Comment actions Permalink

Currently 1.9 debug is very unstable. There is no pre-built version of ruby-debug-ide19 gem, so that is tricky. You can download development kit from http://rubyforge.org/frs/?group_id=167 and unpack it to the root of your ruby 1.9 installation. Be sure that you have no cygwin on the path, or installation will fail. Try to install gem. I was able to get it installed with a devkit, but debug process crashes after a couple of seconds.
It is recommended to stay with 1.8 if you want debugging. Rails developers also recommend staying at 1.8

0
Comment actions Permalink

Hello guys,

I think that it would be pretty useful to show some warning on user's attemp to install ruby-debug-ide gem for Ruby version 1.9

Regards,
Oleg

0
Comment actions Permalink

Thanks guys.

I did end up here for information on how to install the debugger: http://wiki.github.com/mark-moseley/ruby-debug/installation-ide-version . As you point out I needed the DevKit and had to edit the fstab file.

Of course I still had trouble  getting the gem to install as seen in this discussion: http://rubyforge.org/forum/forum.php?thread_id=45896&forum_id=34305

Ultimately I had to reinstall the _ruby_core_source gem and then the ruby-debug-ide gem finally installed.

And as you point out, the debugger blows up when I actually attempt to use it in RubyMine.

I'll try using 1.8.6. You probably should consider putting up a FAQ in these forums regarding support for 1.9.1 and the problems attempting to use it at this point in time. For example pointing out that the debugger doesn't work would be a great bullet point. Also there is a bug in rails 2.3.4 that makes it unusable and I had to install 2.3.3 to create the Notebook application.

I'll let you know how I fair with 1.8.6. Any suggestions for a version of the debugger I should use?

Will the released version of RubyMine 2.0 install Ruby, Rails and a Debugger? If so, what version? Any idea when 1.9.x will be ready for production?

Thanks again.

Message was edited by: Seamus McGowan Since the only installers for windows are for 1.8.6 I'll be attempting to use that version instead of 1.8.7.

0
Comment actions Permalink

I would disagree with the comment that debugging under Ruby 1.9 is unstable. In fact it works fine with RubyMine v1.1.1 build #975 and v1.5 EAP #1364, but you do need to make a couple of patches.

See: http://rubyforge.org/tracker/index.php?func=detail&aid=27083&group_id=8883&atid=34290

0
Comment actions Permalink

Mark, the last time I've tried it was still crashing, sorry for misinformating. I'll try debugging with newest ruby-debug-base19 and ruby-debug-ide19. Does latest version include patch for command.rb?
Also, I have a question. Is it possible to provide pre-built versions of ruby-debug-base19 and ruby-debug-ide19 for Windows, Mac OS X and Linux? Then we can automate debugging gem installation process for ruby 1.9 like we do for 1.8.

0
Comment actions Permalink

The latest version does not include the command.rb hack. If you've removed the "default" parameter, per issue RUBY-4979, then it isn't needed.

And as far as pre-built versions, I'm not sure I understand. The 1.8 ruby-debug doesn't have a pre-built versions of ruby-debug-base for Mac and Linux, but it does for Windows. Compilation is not required for the ruby-debug or ruby-debug-ide gems, same as with ruby-debug19 and ruby-debug-ide19.

Are you asking for a Windows platform release of ruby-debug-base19 that includes the binary?

0
Comment actions Permalink

Default parameter is removed for default web-server, but for example for mongrel 'mongrel' parameter is needed. And when I tried it still caused a crash.
By pre-built version I mean the one that does not need gcc installed to successfully install the gem. I think that "Windows platform release of ruby-debug-base19 that includes the binary" is exactly that thing

0
Comment actions Permalink

Can you try it with the command.rb hack?

The problem with providing a binary for Windows is that I'd have to provide three versions for each 1.9.x (1.9.1-p129, 1.9.2-preview1, and the current Ruby trunk). The Ruby core headers have changed between those versions.

Later, when the headers are stable, I might provide the binary. Another option is to install the devkit (gcc) via a gem; I believe that that's on the to-do list for the RubyInstaller project. If that's available, then I can just add it as a dependency for ruby-debug-base19 and it should be seamless for your users.

I've noted the cygwin conflict issue that you mention, though.

0
Comment actions Permalink

I've tried command.rb hack and debugging works fine.

Also I've changed debug gem name for 1.9 to ruby-debug-ide19, so RubyMine will try to install it for 1.9 instead of ruby-debug-ide. As I understand this should work on Mac OS X and Linux and windows ruby installations with devkit.

Issue with cygwin can be fixed by putting <ruby_with_devkit>/bin before cygwin in system PATH property. Like that: C:\ruby19\bin;C:\cygwin\bin;... If devkit will be availabe as a gem we can ensure that devkit path is first on the list when running gem command.

0
Comment actions Permalink

Good; I'll include a cleaner version of it in the next release of ruby-debug-ide19.

And, installing ruby-debug-ide19 will work as you describe.

Something else to think about: ruby-debug-ide19 includes a new command, "jump". It allows the user to change the next line of code to be executed. If you want to implement it, let me know if you need any details.

0
Comment actions Permalink

Hello Mark,

ruby-debug-ide19 includes a new command, "jump". It allows the user to change the next line of code to be executed. If you want to implement it, let me know if you need any details.

There are no chances to have it done in RubyMine 2.0 final release, but we definitely will consider adding support in of this. RubyMine's debugger already has a command Run to cursor.
As far as I know this feature isn't yet supported in Java backend we use: debug-commons-java http://rubyforge.org/frs/?group_id=3085 (according to commit logs )
Anyway thanks for the information, we'll definitely contact you for more details.

Regards,
Oleg

0
Comment actions Permalink

FYI, I've forked debug-commons-java: see http://github.com/mark-moseley

0
Comment actions Permalink

Thanks, just have seen your added jump/pause commands commit!

0
Comment actions Permalink

You say that the ruby-debug-ide (NOT ruby-debug-ide19) gem comes with a pre-built windows binary, but I haven't found that to be the case. when I execute:

gem install ruby-debug-ide
the installation trys to invoke nmake, and I don't have Visual Studio, or any other build systems on my computer.
As you can imagine, Rubymine is not nearly as useful as it could be without the ability to debug

0

Please sign in to leave a comment.