Rorra's blog Senior Developer

July 24, 2010

Installing RubyDebug with ruby 1.9.2 and rails 3 to use RubyMine

Filed under: Ruby — admin @ 5:26 PM


So you are trying to install ruby-debug to debug rails applications (or perhaps ruby-debug-ide for RubyMine) and you are having problems with it, because you have ruby 1.8.7 for your system, and you are using rvm in order to user ruby 1.9.2 to test rails edge.

The first thing to notice, is that all of the sources that you have installed with rvm are located in $rvm_path/src, so in case you are using ruby 1.9.2 rc 2 as I’m doing right now, the installation is pretty easy

gem install ruby-debug-ide19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-rc2/

But for sure, if you are using ruby 1.9.1 or any other version, you can easily do a ls $rvm_path/src to find the right location to compile ruby-debug-ide19 into your system.

Now, you can add the gem to the Gemfile if you are planning to debug from the console

gem 'ruby-debug19', :require => 'ruby-debug', :group => :development

And then run

rails s --debug

Or if you are using rubymine, the debug will start although it’s not working yet, hopefully it will be working before rubymine 2.3.5 is released, because nobody wants to use rails3 without ruby 1.9.2, or at least I don’t want to do that :P

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress