# Unable to use ruby-debug

**URL:** <https://discuss.rubyonrails.org/t/unable-to-use-ruby-debug/55595>\
**Category:** rubyonrails-talk\
**Created:** [November 8, 2010, 12:52am UTC](https://discuss.rubyonrails.org/t/unable-to-use-ruby-debug/55595 "2010-11-08T00:52:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [November 8, 2010, 12:52am UTC](https://discuss.rubyonrails.org/t/unable-to-use-ruby-debug/55595/1 "2010-11-08T00:52:01Z")

</div>

I'm trying to use ruby-debug but when I try to start the server with it, I get an error saying I need to install it (even though it's installed):

tiberius:project Jonathan$ sudo gem install ruby-debug Building native extensions. This could take a while... Successfully installed ruby-debug-base-0.10.4 Successfully installed ruby-debug-0.10.4 2 gems installed Installing ri documentation for ruby-debug-base-0.10.4... Installing ri documentation for ruby-debug-0.10.4... Installing RDoc documentation for ruby-debug-base-0.10.4... Installing RDoc documentation for ruby-debug-0.10.4...

tiberius:project Jonathan$ rails server --debug =\> Booting WEBrick =\> Rails 3.0.0 application starting in development on [http://0.0.0.0:3000](http://0.0.0.0:3000) =\> Call with -d to detach =\> Ctrl-C to shutdown server You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug' Exiting

tiberius:project Jonathan$ gem list

\*\*\* LOCAL GEMS \*\*\* ... ruby-debug (0.10.4) ruby-debug-base (0.10.4) ...

The gem also appears to run okay:

tiberius:project Jonathan$ irb

> > require 'ruby-debug'

=\> true

Any idea why it's not working?

---

<div class="post-metadata">

**Author:** ![Arzumy](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@Arzumy](https://discuss.rubyonrails.org/u/Arzumy)\
**Post date:** [November 8, 2010, 8:00am UTC](https://discuss.rubyonrails.org/t/unable-to-use-ruby-debug/55595/2 "2010-11-08T08:00:35Z")

</div>

In Rails 3 you need to include the gem in Gemfile

gem 'ruby-debug'

Cheers! Arzumy

---

<div class="post-metadata">

**Author:** ![Bente\_Pieck](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bente\_Pieck](https://discuss.rubyonrails.org/u/Bente_Pieck)\
**Post date:** [November 8, 2010, 12:47pm UTC](https://discuss.rubyonrails.org/t/unable-to-use-ruby-debug/55595/3 "2010-11-08T12:47:28Z")

</div>

If you're using ruby1.9.2 try:

group :development, :test do &nbsp;&nbsp;&nbsp;gem 'ruby-debug19', :require =\> "ruby-debug" end

in your Gemfile.

I'd imply you should update to Rails 3.0.1 because of a security-update for nested attributes (if you use 'em).

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [November 8, 2010, 3:45pm UTC](https://discuss.rubyonrails.org/t/unable-to-use-ruby-debug/55595/4 "2010-11-08T15:45:53Z")

</div>

That did the trick! I just converted over to Rails 3 so I wasn't aware of the Gemfile requirement. smbepiec, thanks for the suggestion -- it will come in handy when I update to Ruby 1.9.2.

Arzumy MD wrote in post #960061:

---

<div class="post-metadata">

**Author:** ![Dev\_Guy](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dev\_Guy](https://discuss.rubyonrails.org/u/Dev_Guy)\
**Post date:** [November 9, 2010, 8:16am UTC](https://discuss.rubyonrails.org/t/unable-to-use-ruby-debug/55595/5 "2010-11-09T08:16:29Z")

</div>

you will also need to type the following at the prompt:

bundle install

FYI: when replying get into the habit of bottom posting, it's easier to follow thread

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [November 9, 2010, 4:23pm UTC](https://discuss.rubyonrails.org/t/unable-to-use-ruby-debug/55595/6 "2010-11-09T16:23:34Z")

</div>

Rajinder Yadav wrote in post #960332:

> you will also need to type the following at the prompt:
> 
> bundle install
> 
> FYI: when replying get into the habit of bottom posting, it's easier to follow thread

Thanks Rajinder!
