aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-04-06 03:17:42 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-04-06 03:17:42 +0000
commit0f0d926def0fd2e5ce806e5a413d12c007dd3b47 (patch)
tree4ba405e3d8f28744bc87181b16d779f07a68baa0
parentdcee137c7b0998b1533c5a028faf5a736078ade3 (diff)
downloadrails-0f0d926def0fd2e5ce806e5a413d12c007dd3b47.tar.gz
rails-0f0d926def0fd2e5ce806e5a413d12c007dd3b47.tar.bz2
rails-0f0d926def0fd2e5ce806e5a413d12c007dd3b47.zip
Fixed that the -r/--ruby path option of the rails command was not being respected (closes #4549) [ryan.raaum@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4177 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/rails_generator/generators/applications/app/app_generator.rb7
2 files changed, 6 insertions, 3 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 8eccbfcd93..160476363b 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed that the -r/--ruby path option of the rails command was not being respected #4549 [ryan.raaum@gmail.com]
+
* Added that Dispatcher exceptions should not be shown to the user unless a default log has not been configured. Instead show public/500.html [DHH]
* Fixed that rake clone_structure_to_test should quit on pgsql if the dump is unsuccesful #4585 [augustz@augustz.com]
diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
index b07133240b..f1f800cf74 100644
--- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb
+++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -17,7 +17,8 @@ class AppGenerator < Rails::Generator::Base
end
def manifest
- script_options = { :chmod => 0755 }
+ # Use /usr/bin/env if no special shebang was specified
+ script_options = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }
dispatcher_options = { :chmod => 0755, :shebang => options[:shebang] }
record do |m|
@@ -93,8 +94,8 @@ class AppGenerator < Rails::Generator::Base
def add_options!(opt)
opt.separator ''
opt.separator 'Options:'
- opt.on("-r", "--ruby", String,
- "Path to the Ruby binary of your choice.",
+ opt.on("-r", "--ruby=path", String,
+ "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).",
"Default: #{DEFAULT_SHEBANG}") { |options[:shebang]| }
opt.on("-d", "--database=name", String,