aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/bin/about2
-rw-r--r--railties/bin/breakpointer2
-rw-r--r--railties/bin/console2
-rw-r--r--railties/bin/destroy2
-rw-r--r--railties/bin/generate2
-rw-r--r--railties/bin/performance/benchmarker2
-rw-r--r--railties/bin/performance/profiler2
-rw-r--r--railties/bin/plugin2
-rw-r--r--railties/bin/process/reaper2
-rw-r--r--railties/bin/process/spawner2
-rw-r--r--railties/bin/process/spinner2
-rw-r--r--railties/bin/runner2
-rw-r--r--railties/bin/server2
-rw-r--r--railties/lib/commands/performance/benchmarker.rb2
-rw-r--r--railties/lib/commands/performance/profiler.rb1
-rw-r--r--railties/lib/rails_generator/generators/applications/app/app_generator.rb9
17 files changed, 20 insertions, 20 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 4a02b8c226..2abf4f9d9a 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Changed all script/* to use #!/usr/bin/env ruby instead of hard-coded Ruby path. public/dispatcher.* still uses the hard-coded path for compatibility with web servers that doesn't have Ruby in path [DHH]
+
* Force RAILS_ENV to be "test" when running tests, so that ENV["RAILS_ENV"] = "production" in config/environment.rb doesn't wreck havok [DHH] #2660
* Correct versioning in :freeze_gems Rake task. #2778 [jakob@mentalized.net, Jeremy Kemper]
diff --git a/railties/bin/about b/railties/bin/about
index 6213338119..7b07d46a30 100644
--- a/railties/bin/about
+++ b/railties/bin/about
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/about' \ No newline at end of file
diff --git a/railties/bin/breakpointer b/railties/bin/breakpointer
index 2918f8c152..64af76edd4 100644
--- a/railties/bin/breakpointer
+++ b/railties/bin/breakpointer
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/breakpointer' \ No newline at end of file
diff --git a/railties/bin/console b/railties/bin/console
index f2143e5719..42f28f7d6d 100644
--- a/railties/bin/console
+++ b/railties/bin/console
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/console' \ No newline at end of file
diff --git a/railties/bin/destroy b/railties/bin/destroy
index c2799bd20d..fa0e6fcd0b 100644
--- a/railties/bin/destroy
+++ b/railties/bin/destroy
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy' \ No newline at end of file
diff --git a/railties/bin/generate b/railties/bin/generate
index d8a1599870..ef976e09f3 100644
--- a/railties/bin/generate
+++ b/railties/bin/generate
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate' \ No newline at end of file
diff --git a/railties/bin/performance/benchmarker b/railties/bin/performance/benchmarker
index c270b4c6d5..c842d35d33 100644
--- a/railties/bin/performance/benchmarker
+++ b/railties/bin/performance/benchmarker
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/benchmarker'
diff --git a/railties/bin/performance/profiler b/railties/bin/performance/profiler
index 6acc0c21c4..d855ac8b13 100644
--- a/railties/bin/performance/profiler
+++ b/railties/bin/performance/profiler
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/profiler'
diff --git a/railties/bin/plugin b/railties/bin/plugin
index d3c4ba40c8..26ca64c06b 100644
--- a/railties/bin/plugin
+++ b/railties/bin/plugin
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin' \ No newline at end of file
diff --git a/railties/bin/process/reaper b/railties/bin/process/reaper
index 3bcfb48347..c77f04535f 100644
--- a/railties/bin/process/reaper
+++ b/railties/bin/process/reaper
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
diff --git a/railties/bin/process/spawner b/railties/bin/process/spawner
index 73a98128eb..7118f3983c 100644
--- a/railties/bin/process/spawner
+++ b/railties/bin/process/spawner
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
diff --git a/railties/bin/process/spinner b/railties/bin/process/spinner
index 0b546dd0a3..6816b32ef4 100644
--- a/railties/bin/process/spinner
+++ b/railties/bin/process/spinner
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spinner'
diff --git a/railties/bin/runner b/railties/bin/runner
index cd2496d6a0..ccc30f9d24 100644
--- a/railties/bin/runner
+++ b/railties/bin/runner
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/runner' \ No newline at end of file
diff --git a/railties/bin/server b/railties/bin/server
index 59d8259788..dfabcb8812 100644
--- a/railties/bin/server
+++ b/railties/bin/server
@@ -1,3 +1,3 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server' \ No newline at end of file
diff --git a/railties/lib/commands/performance/benchmarker.rb b/railties/lib/commands/performance/benchmarker.rb
index b12cf57215..47b0940039 100644
--- a/railties/lib/commands/performance/benchmarker.rb
+++ b/railties/lib/commands/performance/benchmarker.rb
@@ -1,5 +1,3 @@
-#!/usr/local/bin/ruby
-
if ARGV.empty?
puts "Usage: ./script/perform benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ..."
exit 1
diff --git a/railties/lib/commands/performance/profiler.rb b/railties/lib/commands/performance/profiler.rb
index f599ad6635..83e763abda 100644
--- a/railties/lib/commands/performance/profiler.rb
+++ b/railties/lib/commands/performance/profiler.rb
@@ -1,4 +1,3 @@
-#!/usr/local/bin/ruby
if ARGV.empty?
$stderr.puts "Usage: ./script/perform profiler 'Person.expensive_method(10)' [times]"
exit(1)
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 aee2cced24..2713854b61 100644
--- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb
+++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -16,7 +16,8 @@ class AppGenerator < Rails::Generator::Base
end
def manifest
- script_options = { :chmod => 0755, :shebang => options[:shebang] }
+ script_options = { :chmod => 0755 }
+ dispatcher_options = { :chmod => 0755, :shebang => options[:shebang] }
record do |m|
# Root directory and all subdirectories.
@@ -53,9 +54,9 @@ class AppGenerator < Rails::Generator::Base
end
# Dispatches
- m.file "dispatches/dispatch.rb", "public/dispatch.rb", script_options
- m.file "dispatches/dispatch.rb", "public/dispatch.cgi", script_options
- m.file "dispatches/dispatch.fcgi", "public/dispatch.fcgi", script_options
+ m.file "dispatches/dispatch.rb", "public/dispatch.rb", dispatcher_options
+ m.file "dispatches/dispatch.rb", "public/dispatch.cgi", dispatcher_options
+ m.file "dispatches/dispatch.fcgi", "public/dispatch.fcgi", dispatcher_options
# HTML files
%w(404 500 index).each do |file|