diff --git a/instiki b/instiki index c6a5592f..bf720a1c 100755 --- a/instiki +++ b/instiki @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Executable file for a gem # must be same as ./instiki.rb diff --git a/instiki.rb b/instiki.rb index e5637f96..f26498e4 100755 --- a/instiki.rb +++ b/instiki.rb @@ -1,3 +1,3 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby load File.dirname(__FILE__) + '/script/server' diff --git a/lib/bluecloth_tweaked.rb b/lib/bluecloth_tweaked.rb index 468b4fea..b91622f1 100644 --- a/lib/bluecloth_tweaked.rb +++ b/lib/bluecloth_tweaked.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # Bluecloth is a Ruby implementation of Markdown, a text-to-HTML conversion # tool. diff --git a/public/dispatch.cgi b/public/dispatch.cgi index 3848806d..ce705d36 100755 --- a/public/dispatch.cgi +++ b/public/dispatch.cgi @@ -1,4 +1,4 @@ -#!/usr/bin/ruby1.8 +#!/usr/bin/env ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) diff --git a/public/dispatch.fcgi b/public/dispatch.fcgi index 3169ba26..664dbbbe 100755 --- a/public/dispatch.fcgi +++ b/public/dispatch.fcgi @@ -1,4 +1,4 @@ -#!/usr/bin/ruby1.8 +#!/usr/bin/env ruby # # You may specify the path to the FastCGI crash log (a log of unhandled # exceptions which forced the FastCGI instance to exit, great for debugging) diff --git a/public/dispatch.rb b/public/dispatch.rb index 7095803c..ce705d36 100755 --- a/public/dispatch.rb +++ b/public/dispatch.rb @@ -1,4 +1,4 @@ -#!e:/ruby/bin/ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) diff --git a/script/benchmarker b/script/benchmarker index 2e323b66..4a0ea231 100755 --- a/script/benchmarker +++ b/script/benchmarker @@ -1,4 +1,4 @@ -#!/usr/bin/ruby1.8 +#!/usr/bin/env ruby if ARGV.empty? puts "Usage: benchmarker times 'Person.expensive_way' 'Person.another_expensive_way' ..." diff --git a/script/breakpointer b/script/breakpointer index 89e286dd..6375616b 100755 --- a/script/breakpointer +++ b/script/breakpointer @@ -1,4 +1,4 @@ -#!e:/ruby/bin/ruby +#!/usr/bin/env ruby require 'rubygems' require_gem 'rails' require 'breakpoint_client' diff --git a/script/console b/script/console index eece24a9..e23abda3 100755 --- a/script/console +++ b/script/console @@ -1,4 +1,4 @@ -#!/usr/local/bin/ruby +#!/usr/bin/env ruby irb = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb' require 'optparse' diff --git a/script/destroy b/script/destroy index 624049da..46cc786e 100755 --- a/script/destroy +++ b/script/destroy @@ -1,4 +1,4 @@ -#!/usr/bin/ruby1.8 +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/environment' require 'rails_generator' require 'rails_generator/scripts/destroy' diff --git a/script/generate b/script/generate index a104fc94..26447804 100755 --- a/script/generate +++ b/script/generate @@ -1,4 +1,4 @@ -#!/usr/bin/ruby1.8 +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/environment' require 'rails_generator' require 'rails_generator/scripts/generate' diff --git a/script/profiler b/script/profiler index 92cf8247..77c9fbef 100755 --- a/script/profiler +++ b/script/profiler @@ -1,4 +1,4 @@ -#!/usr/bin/ruby1.8 +#!/usr/bin/env ruby if ARGV.empty? $stderr.puts "Usage: profiler 'Person.expensive_method(10)' [times]" exit(1) diff --git a/script/runner b/script/runner index a9f705c1..9c8bbb13 100755 --- a/script/runner +++ b/script/runner @@ -1,4 +1,4 @@ -#!/usr/bin/ruby1.8 +#!/usr/bin/env ruby require 'optparse' options = { :environment => "development" } @@ -23,7 +23,7 @@ end ENV["RAILS_ENV"] = options[:environment] -#!/usr/local/bin/ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/environment' eval(ARGV.first) \ No newline at end of file diff --git a/script/server b/script/server index c6bdbb6f..0044d3ef 100755 --- a/script/server +++ b/script/server @@ -1,4 +1,4 @@ -#!/usr/local/bin/ruby +#!/usr/bin/env ruby require 'webrick' require 'optparse' diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index a24cf8c0..3270b08e 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../test_helper') require 'admin_controller' diff --git a/test/functional/file_controller_test.rb b/test/functional/file_controller_test.rb index cea3aa81..77040c60 100755 --- a/test/functional/file_controller_test.rb +++ b/test/functional/file_controller_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../test_helper' require 'file_controller' diff --git a/test/functional/routes_test.rb b/test/functional/routes_test.rb index c2334ef7..b07a6438 100644 --- a/test/functional/routes_test.rb +++ b/test/functional/routes_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../test_helper' diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index b799ad3b..984bf4cd 100755 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby # Uncomment the line below to enable pdflatex tests; don't forget to comment them again # commiting to SVN diff --git a/test/unit/chunks/category_test.rb b/test/unit/chunks/category_test.rb index 163075f0..6bc7627f 100755 --- a/test/unit/chunks/category_test.rb +++ b/test/unit/chunks/category_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../test_helper' require 'chunks/category' diff --git a/test/unit/chunks/nowiki_test.rb b/test/unit/chunks/nowiki_test.rb index 2fcad789..8af5a645 100755 --- a/test/unit/chunks/nowiki_test.rb +++ b/test/unit/chunks/nowiki_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../test_helper' require 'chunks/nowiki' diff --git a/test/unit/chunks/wiki_test.rb b/test/unit/chunks/wiki_test.rb index b73a88cc..09871729 100755 --- a/test/unit/chunks/wiki_test.rb +++ b/test/unit/chunks/wiki_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../test_helper' require 'chunks/wiki' diff --git a/test/unit/diff_test.rb b/test/unit/diff_test.rb index 90d0e79c..9981305e 100755 --- a/test/unit/diff_test.rb +++ b/test/unit/diff_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../test_helper') require 'diff' diff --git a/test/unit/file_yard_test.rb b/test/unit/file_yard_test.rb index 9d76bd7c..b1859ec2 100755 --- a/test/unit/file_yard_test.rb +++ b/test/unit/file_yard_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../test_helper' require 'fileutils' diff --git a/test/unit/redcloth_for_tex_test.rb b/test/unit/redcloth_for_tex_test.rb index d15071a0..3556beaf 100755 --- a/test/unit/redcloth_for_tex_test.rb +++ b/test/unit/redcloth_for_tex_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../test_helper' require 'redcloth_for_tex' diff --git a/test/unit/uri_test.rb b/test/unit/uri_test.rb index 4affbd60..29326c3b 100755 --- a/test/unit/uri_test.rb +++ b/test/unit/uri_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../test_helper' require 'chunks/uri' diff --git a/test/unit/wiki_words_test.rb b/test/unit/wiki_words_test.rb index 93bc5d12..f90a8d12 100755 --- a/test/unit/wiki_words_test.rb +++ b/test/unit/wiki_words_test.rb @@ -1,4 +1,4 @@ -#!/bin/env ruby +#!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../test_helper') require 'wiki_words'