diff --git a/railties/lib/rails/generators/rails/plugin/templates/Gemfile b/railties/lib/rails/generators/rails/plugin/templates/Gemfile index 35ad9fbf9e..ab8b8925eb 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/Gemfile +++ b/railties/lib/rails/generators/rails/plugin/templates/Gemfile @@ -37,7 +37,7 @@ end <% end -%> <% end -%> -<% unless defined?(JRUBY_VERSION) -%> +<% if RUBY_ENGINE == 'ruby' -%> # To use a debugger <%- if RUBY_VERSION < '2.0.0' -%> # gem 'debugger', group: [:development, :test] diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 5f9f7ad50a..38a082ab9e 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -340,7 +340,7 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_inclusion_of_a_debugger run_generator - if defined?(JRUBY_VERSION) + if defined?(JRUBY_VERSION) || RUBY_ENGINE == 'rbx' assert_file "Gemfile" do |content| assert_no_match(/byebug/, content) assert_no_match(/debugger/, content)