Hi Everyone,
Can any one help me in debugging code in ruby on rails. I am using
Ruby 1.8.4 and radrails 0.7.2 IDE …
PLease give me some guidence in debugging the ruby code in radrails
IDE(0.7.2 version)…
Regards
Krishna.Mundra
Hi Everyone,
Can any one help me in debugging code in ruby on rails. I am using
Ruby 1.8.4 and radrails 0.7.2 IDE …
PLease give me some guidence in debugging the ruby code in radrails
IDE(0.7.2 version)…
Regards
Krishna.Mundra
for print outs in the controller
logger.debug = “something” + variable…
in view i use
<%= debug(@something)%>
Krishna M. wrote:
Hi Everyone,
Can any one help me in debugging code in ruby on rails. I am using
Ruby 1.8.4 and radrails 0.7.2 IDE …PLease give me some guidence in debugging the ruby code in radrails
IDE(0.7.2 version)…Regards
Krishna.Mundra
oh yea, i also use “tail -f development.log” in the log directory.
tailing is good, this is better…
i’m using it on windows, so i don’t know how it will work on linux.
more information here:
thanks to Kyle
install this:
gem install ruby-debug
run server like this:
rdebug script/server
set breakpoints in your application like this:
debugger if ENV[‘RAILS_ENV’] == ‘development’
short indroduction:
if redbug is started, use help for displaying available commands.
most important commands at starting:
set autolist
set autoeval
set autoreload
help [command] => shows help for [command]
pretty nice to use and fast.
will be integrated into RadRails with the next release. so i hope.
enjoy developing RoR again.
HTH
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs