views:

38

answers:

2

I am a Cakephp developer that is currently doing some work in ruby on rails and one thing i use a lot in cakephp is debug-kit which allows me to see many things within the web page such as request information and variables available in the view.

Is anything like this available for rails as i cant seem to find something similar.

+3  A: 

there is ruby-debug which you can use with RoR in order to debug your application. you need the ruby-debug gem

sudo gem install ruby-debug

after that you have to start the server in debugging mode.

script/server --debugger

now if you put the line

debugger 

somewhere in your rails code, the console where you run the server fires up an irb where you can see all the request variables and debug information you need.

WEBrick or Mongrel is currently supported with debugger.

for all the debug options with ruby on rails see http://guides.rubyonrails.org/debugging_rails_applications.html

z3cko
+1  A: 

While I agree with z3cko's answer (+1!), you should also take a look at Rack::Bug:

http://www.brynary.com/2009/4/22/rack-bug-debugging-toolbar-in-four-minutes

Go over the screencast linked from that post.

Great tool

hgimenez