Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10637: doc_update_for_debugger_section_to_mention_ruby_debug_gem.diff

File doc_update_for_debugger_section_to_mention_ruby_debug_gem.diff, 2.9 kB (added by mikong, 6 months ago)
  • vendor/rails/railties/README

    old new  
    3131   and your application name. Ex: rails myapp 
    3232   (If you've downloaded Rails in a complete tgz or zip, this step is already done) 
    33332. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options) 
    34 3. Go to http://localhost:3000/ and get "Welcome aboard: You’re riding the Rails!" 
     343. Go to http://localhost:3000 and get "Welcome aboard: You’re riding the Rails!" 
    35354. Follow the guidelines to start developing your application 
    3636 
    3737 
    3838== Web Servers 
    3939 
    4040By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise 
    41 Rails will use WEBrick, the webserver that ships with Ruby. When you run script/server
     41Rails will use WEBrick, the webserver that ships with Ruby. When you run <tt>script/server</tt>
    4242Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures 
    4343that you can always get up and running quickly. 
    4444 
     
    8787 
    8888  Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1 
    8989 
    90 More information on how to use the logger is at http://www.ruby-doc.org/core/ 
     90More information on how to use the logger is at http://www.ruby-doc.org/core 
    9191 
    92 Also, Ruby documentation can be found at http://www.ruby-lang.org/ including: 
     92Also, Ruby documentation can be found at http://www.ruby-lang.org including: 
    9393 
    94 * The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/ 
    95 * Learn to Program: http://pine.fm/LearnToProgram/  (a beginners guide) 
     94* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby 
     95* Learn to Program: http://pine.fm/LearnToProgram  (a beginners guide) 
    9696 
    9797These two online (and free) books will bring you up to speed on the Ruby language 
    9898and also on programming in general. 
     
    100100 
    101101== Debugger 
    102102 
    103 Debugger support is available through the debugger command when you start your Mongrel or 
    104 Webrick server with --debugger. This means that you can break out of execution at any point 
    105 in the code, investigate and change the model, AND then resume execution! Example: 
     103With debugger, you can break out of execution at any point in the application, examine objects, 
     104step through the code, change things like values of variables, and resume execution. To use debugger, 
     105you need to install the ruby-debug gem (simply run <tt>gem install ruby-debug</tt>). Then put <tt>debugger</tt> 
     106where you want to stop the execution and start your Mongrel or WEBrick server with --debugger or -u. 
     107Here's an example: 
    106108 
    107109  class WeblogController < ActionController::Base 
    108110    def index 
     
    127129  >> f. 
    128130  Display all 152 possibilities? (y or n) 
    129131 
    130 Finally, when you're ready to resume execution, you enter "cont" 
     132Finally, when you're ready to resume execution, execute <tt>cont</tt>. 
    131133 
    132134 
    133135== Console