diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-17 19:48:25 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-19 16:11:54 +0200 |
commit | e0a4d8be93b1bfa17cbf1fb87947d7b12049ddc7 (patch) | |
tree | 81bfa823dde5db0e9ab602694642ae31ec91a64a /railties/lib | |
parent | 6f044c9b6c52ae1b1f63fd6053b77375fd37ae8e (diff) | |
download | rails-e0a4d8be93b1bfa17cbf1fb87947d7b12049ddc7.tar.gz rails-e0a4d8be93b1bfa17cbf1fb87947d7b12049ddc7.tar.bz2 rails-e0a4d8be93b1bfa17cbf1fb87947d7b12049ddc7.zip |
Fix shebang on created files.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generator/generators/app.rb | 6 | ||||
-rw-r--r-- | railties/lib/generator/templates/app/config/environment.rb | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/railties/lib/generator/generators/app.rb b/railties/lib/generator/generators/app.rb index 86e662d27c..101727de7a 100644 --- a/railties/lib/generator/generators/app.rb +++ b/railties/lib/generator/generators/app.rb @@ -185,12 +185,8 @@ module Rails::Generators ActiveSupport::SecureRandom.hex(64) end - def freeze - options[:freeze] - end - def shebang - options[:ruby] || "#!/usr/bin/env ruby" + "#!#{options[:ruby] || "/usr/bin/env ruby"}" end def mysql_socket diff --git a/railties/lib/generator/templates/app/config/environment.rb b/railties/lib/generator/templates/app/config/environment.rb index d4e2c9bdff..6a4db65e8f 100644 --- a/railties/lib/generator/templates/app/config/environment.rb +++ b/railties/lib/generator/templates/app/config/environment.rb @@ -1,7 +1,7 @@ # Be sure to restart your server when you modify this file # Specifies gem version of Rails to use when vendor/rails is not present -<%= '# ' if freeze %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' unless defined? RAILS_GEM_VERSION +<%= '# ' if options[:freeze] %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') |