This forum is no longer active. Please post your questions to our new community site

cannot debug ruby apps

Subscribe to cannot debug ruby apps 7 post(s), 3 voice(s)

Avatar tuo_pe 3 post(s)


I have installed Bitnami Rubystack on Ubuntu. I also have installed a gem,
sudo gem install ruby-debug.

When I try to launch the server, i.e.
ruby script/server -u

I get
bash-3.2$ ruby script/server -u
=> Booting Mongrel
=> Rails 2.3.2 application starting on
You need to install ruby-debug to run the server in debugging mode. With gems, use ‘gem install ruby-debug’

What’s the issue here? :-(


Avatar tuo_pe 3 post(s)

I got it! Seems to me that “sudo gem” launches the wrong gem binary. After I used the absolute path for the gem binary in my bitnami directory, I got

bash-3.2$ /home/tuope/WWW/RoR/ruby/bin/gem install ruby-debug
Building native extensions. This could take a while…
Successfully installed columnize-0.3.1
Successfully installed linecache-0.43
2 gems installed
Installing ri documentation for columnize-0.3.1…
Installing ri documentation for linecache-0.43…
Installing RDoc documentation for columnize-0.3.1…
Installing RDoc documentation for linecache-0.43…

And now I can launch the server with the debugger enabled. :-)


Avatar Beltrán Rueda Administrator 3,714 post(s)


RubyStack is completly self-contained and independent of your system. You should use the gem binary that the Stack ships to install the ruby-debug gem:

$ cd installdir
$ ruby/bin/gem install ruby-debug

or you can run the rubyconsole to load the Stack environment:

$ cd installdir
$ ./rubyconsole

then you can check that now you are using the gem Stack binary:

$ which gem
$ gem install ruby-debug

I hope it helps.

Avatar tuo_pe 3 post(s)

beltran, indeed. :-)

bash-3.2$ sudo which gem

No wonder it was not working. Thanks for your reply. One of the GREAT things about the Bitnami Rubystack is definitely the fact that it is self-contained and independent of the rest of the system.

Anyway, I am so relieved that I got this issue solved. Thanks again for replying.


Avatar Beltrán Rueda Administrator 3,714 post(s)

I’m glad to hear this :) Let us know any question or suggestion to improve it. Cheers.

Avatar steve_w 3 post(s)

I too am unsuccessful at installing ruby debug with Rubystack however my error keeps telling me that the current directory is invalid. I’ve tried this several times in different directories but always get the same message. I’m on a Vista 32 bit machine…which may be an issue itself. Error message:

C:\Program Files\BitNami RubyStack\ruby\bin>gem install ruby-debug
Building native extensions. This could take a while…
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.

“C:/Program Files/BitNami RubyStack/ruby/bin/ruby.exe” extconf.rb
The current directory is invalid.

Gem files will remain installed in C:/Program Files/BitNami RubyStack/ruby/lib/r
uby/gems/1.8/gems/ruby-debug-base-0.10.3 for inspection.
Results logged to C:/Program Files/BitNami RubyStack/ruby/lib/ruby/gems/1.8/gems

Avatar Beltrán Rueda Administrator 3,714 post(s)


Taking a look the following post , it seems that the 10.0 version does not include the precompiled gem and try to compile it. Try to install the 0.9.3 version:

gem install ruby-debug -v 0.9.3