aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/actions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/actions.rb')
-rw-r--r--railties/lib/rails/generators/actions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb
index 575f4bb106..b26839644e 100644
--- a/railties/lib/rails/generators/actions.rb
+++ b/railties/lib/rails/generators/actions.rb
@@ -90,7 +90,7 @@ module Rails
append_file "Gemfile", "\ngroup #{name} do\n", :force => true
@in_group = true
- instance_eval &block
+ instance_eval(&block)
@in_group = false
append_file "Gemfile", "end\n", :force => true
@@ -252,7 +252,7 @@ module Rails
#
def rake(command, options={})
log :rake, command
- env = options[:env] || 'development'
+ env = options[:env] || ENV["RAILS_ENV"] || 'development'
sudo = options[:sudo] && RbConfig::CONFIG['host_os'] !~ /mswin|mingw/ ? 'sudo ' : ''
in_root { run("#{sudo}#{extify(:rake)} #{command} RAILS_ENV=#{env}", :verbose => false) }
end