Skip to content
This repository
Browse code

Fixed that the -r/--ruby path option of the rails command was not bei…

…ng respected (closes #4549) [ryan.raaum@gmail.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4177 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 0f0d926def0fd2e5ce806e5a413d12c007dd3b47 1 parent dcee137
David Heinemeier Hansson authored April 06, 2006
2  railties/CHANGELOG
... ...
@@ -1,5 +1,7 @@
1 1
 *SVN*
2 2
 
  3
+* Fixed that the -r/--ruby path option of the rails command was not being respected #4549 [ryan.raaum@gmail.com]
  4
+
3 5
 * 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]
4 6
 
5 7
 * Fixed that rake clone_structure_to_test should quit on pgsql if the dump is unsuccesful #4585 [augustz@augustz.com]
7  railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -17,7 +17,8 @@ def initialize(runtime_args, runtime_options = {})
17 17
   end
18 18
 
19 19
   def manifest
20  
-    script_options     = { :chmod => 0755 }
  20
+    # Use /usr/bin/env if no special shebang was specified
  21
+    script_options     = { :chmod => 0755, :shebang => options[:shebang] == DEFAULT_SHEBANG ? nil : options[:shebang] }
21 22
     dispatcher_options = { :chmod => 0755, :shebang => options[:shebang] }
22 23
 
23 24
     record do |m|
@@ -93,8 +94,8 @@ def banner
93 94
     def add_options!(opt)
94 95
       opt.separator ''
95 96
       opt.separator 'Options:'
96  
-      opt.on("-r", "--ruby", String,
97  
-             "Path to the Ruby binary of your choice.",
  97
+      opt.on("-r", "--ruby=path", String,
  98
+             "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).",
98 99
              "Default: #{DEFAULT_SHEBANG}") { |options[:shebang]| }
99 100
 
100 101
       opt.on("-d", "--database=name", String,

0 notes on commit 0f0d926

Please sign in to comment.
Something went wrong with that request. Please try again.