Skip to content

Commit

Permalink
Replace ruby-debug19 which doesnt work on 1.9.3 out of the box with a…
Browse files Browse the repository at this point in the history
… more maintained debugger gem
  • Loading branch information
Aditya Sanghi committed Apr 17, 2012
1 parent 9a97699 commit 56674db
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion railties/guides/code/getting_started/Gemfile
Expand Up @@ -35,4 +35,4 @@ gem 'jquery-rails'
# gem 'capistrano' # gem 'capistrano'


# To use debugger # To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug' # gem 'debugger'
Expand Up @@ -205,7 +205,7 @@ The debugger used by Rails, +ruby-debug+, comes as a gem. To install it, just ru
$ sudo gem install ruby-debug $ sudo gem install ruby-debug
</shell> </shell>


TIP: If you are using Ruby 1.9, you can install a compatible version of +ruby-debug+ by running +sudo gem install ruby-debug19+ TIP: If you are using Ruby 1.9, you can install a compatible version of +debugger+ by running +sudo gem install debugger+


In case you want to download a particular version or get the source code, refer to the "project's page on rubyforge":http://rubyforge.org/projects/ruby-debug/. In case you want to download a particular version or get the source code, refer to the "project's page on rubyforge":http://rubyforge.org/projects/ruby-debug/.


Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/app_base.rb
Expand Up @@ -188,7 +188,7 @@ def ruby_debugger_gemfile_entry
if RUBY_VERSION < "1.9" if RUBY_VERSION < "1.9"
"gem 'ruby-debug'" "gem 'ruby-debug'"
else else
"gem 'ruby-debug19', :require => 'ruby-debug'" "gem 'debugger'"
end end
end end


Expand Down
4 changes: 2 additions & 2 deletions railties/test/generators/app_generator_test.rb
Expand Up @@ -308,10 +308,10 @@ def test_inclusion_of_ruby_debug
end end
end end


def test_inclusion_of_ruby_debug19_if_ruby19 def test_inclusion_of_debugger_if_ruby19
run_generator run_generator
assert_file "Gemfile" do |contents| assert_file "Gemfile" do |contents|
assert_match(/gem 'ruby-debug19', :require => 'ruby-debug'/, contents) unless RUBY_VERSION < '1.9' assert_match(/gem 'debugger'/, contents) unless RUBY_VERSION < '1.9'
end end
end end


Expand Down

0 comments on commit 56674db

Please sign in to comment.