From 27049b848dd48eca4df160e6024d66215230d260 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Barth Date: Tue, 2 Nov 2010 00:20:21 +0000 Subject: Use File#expand_path for require's in script/* for Ruby 1.9.2 compatibility. #4050 Since Ruby 1.9.2, LOAD_PATH does not include "." directory anymore, so we should use absolute paths instead to ensure both 1.8.x and 1.9.x compatibility. It has been included in railties 2.3.x branch since july 2009, see http://github.com/rails/rails/commit/7a427a83ca4da92c70760007aaf313638a5d8374 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4359 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- script/about | 2 +- script/breakpointer | 4 ++-- script/console | 4 ++-- script/dbconsole | 2 +- script/destroy | 4 ++-- script/generate | 4 ++-- script/performance/benchmarker | 2 +- script/performance/profiler | 2 +- script/performance/request | 2 +- script/plugin | 4 ++-- script/process/inspector | 2 +- script/process/reaper | 2 +- script/process/spawner | 2 +- script/process/spinner | 2 +- script/runner | 4 ++-- script/server | 4 ++-- 16 files changed, 23 insertions(+), 23 deletions(-) (limited to 'script') diff --git a/script/about b/script/about index 00ae734e3..61112a015 100755 --- a/script/about +++ b/script/about @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info" require 'commands/about' diff --git a/script/breakpointer b/script/breakpointer index 64af76edd..d7db15af9 100755 --- a/script/breakpointer +++ b/script/breakpointer @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/breakpointer' \ No newline at end of file +require File.expand_path('../../config/boot', __FILE__) +require 'commands/breakpointer' diff --git a/script/console b/script/console index 42f28f7d6..235a1f278 100755 --- a/script/console +++ b/script/console @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/console' \ No newline at end of file +require File.expand_path('../../config/boot', __FILE__) +require 'commands/console' diff --git a/script/dbconsole b/script/dbconsole index caa60ce82..83c8436a9 100644 --- a/script/dbconsole +++ b/script/dbconsole @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/dbconsole' diff --git a/script/destroy b/script/destroy index fa0e6fcd0..88d295f7a 100755 --- a/script/destroy +++ b/script/destroy @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/destroy' \ No newline at end of file +require File.expand_path('../../config/boot', __FILE__) +require 'commands/destroy' diff --git a/script/generate b/script/generate index ef976e09f..62a8a4c0c 100755 --- a/script/generate +++ b/script/generate @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/generate' \ No newline at end of file +require File.expand_path('../../config/boot', __FILE__) +require 'commands/generate' diff --git a/script/performance/benchmarker b/script/performance/benchmarker index c842d35d3..3bff809fb 100755 --- a/script/performance/benchmarker +++ b/script/performance/benchmarker @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../../config/boot', __FILE__) require 'commands/performance/benchmarker' diff --git a/script/performance/profiler b/script/performance/profiler index d855ac8b1..07640575c 100755 --- a/script/performance/profiler +++ b/script/performance/profiler @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../../config/boot', __FILE__) require 'commands/performance/profiler' diff --git a/script/performance/request b/script/performance/request index ae3f38c74..489e568e6 100644 --- a/script/performance/request +++ b/script/performance/request @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/performance/request' diff --git a/script/plugin b/script/plugin index 26ca64c06..b82201fa8 100755 --- a/script/plugin +++ b/script/plugin @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/plugin' \ No newline at end of file +require File.expand_path('../../config/boot', __FILE__) +require 'commands/plugin' diff --git a/script/process/inspector b/script/process/inspector index bf25ad86d..8bcabb052 100644 --- a/script/process/inspector +++ b/script/process/inspector @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/process/inspector' diff --git a/script/process/reaper b/script/process/reaper index c77f04535..aa7c1a053 100755 --- a/script/process/reaper +++ b/script/process/reaper @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/process/reaper' diff --git a/script/process/spawner b/script/process/spawner index 7118f3983..69b33594d 100755 --- a/script/process/spawner +++ b/script/process/spawner @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/process/spawner' diff --git a/script/process/spinner b/script/process/spinner index 6816b32ef..190c2bec7 100755 --- a/script/process/spinner +++ b/script/process/spinner @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' +require File.expand_path('../../config/boot', __FILE__) require 'commands/process/spinner' diff --git a/script/runner b/script/runner index ccc30f9d2..be4c5d457 100755 --- a/script/runner +++ b/script/runner @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/runner' \ No newline at end of file +require File.expand_path('../../config/boot', __FILE__) +require 'commands/runner' diff --git a/script/server b/script/server index dfabcb881..b9fcb7179 100755 --- a/script/server +++ b/script/server @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/server' \ No newline at end of file +require File.expand_path('../../config/boot', __FILE__) +require 'commands/server' -- cgit v1.2.3