Project

General

Profile

Debugging for redmine 2.x on ubuntu 13.10

Added by Thomas Kohler almost 11 years ago

Since the upgrade on my ubuntu to version 13.10 I have a problem what need to be debugged. With older versions of redmine I debugged redmine using the mongrel server and the "debugger gem". I don't know if this is ubuntu related but the "script/server" is not available anymore. Therefore I don't know how to debug redmine at the moment. What is the best way to do so?


Replies (2)

RE: Debugging for redmine 2.x on ubuntu 13.10 - Added by Thomas Kohler almost 11 years ago

After some further investigation this is one way to do debugging on redmine 2.3.1 under ubuntu 13.10 (ruby 1.9.3, Rails 3.2.13)

Debugging application with webrick

  • webrick (is already installed)
  • "gem install ruby-debug19" seems to be not maintained anymore see: http://stackoverflow.com/questions/1083451/debugging-in-ruby-1-9/10414984#10414984, use gem "debugger" instead (for installation instructions see the link above or short description below)
  • Add the keyword "debugger" at the line in your rb file where you want to stop end debug (next, cont etc. are available)
  • stop your apache webserver f.e.: "/etc/init.d/apache2 stop"
  • start your webrick server in your redmine directory, connect to your redmine website (port 3000 is used in my example)
cd /usr/share/redmine
script/rails server webrick -e production -p 3000 --debug

Installation of debugger gem

cd /usr/share/redmine
vi Gemfile

Add one line like so:

source 'https://rubygems.org'
gem 'debugger', group: [:development, :test]

Start your server:

script/rails server webrick -e production -p 3000 --debug

In case of an error occur ...

Could not find gem 'debugger (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.

...do installation like requested:
bundle install

RE: Debugging for redmine 2.x on ubuntu 13.10 - Added by Mischa The Evil almost 11 years ago

FWIW: for debugging on Ruby 2.x I'd recommend the use of Byebug instead.

    (1-2/2)