From f1cfd1248734ceaa50c1857f33d7ee0ecfdce3e6 Mon Sep 17 00:00:00 2001 From: Cheah Chu Yeow Date: Mon, 23 Jun 2008 21:56:02 +0800 Subject: Allow script/about to run in production mode instead of failing with a cryptic const_missing error. [#370 state:resolved] --- railties/CHANGELOG | 2 ++ railties/bin/about | 3 ++- railties/lib/commands/about.rb | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'railties') diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 27d4313862..7e5c35da15 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* Fix script/about in production mode. #370 [Cheah Chu Yeow, Xavier Noria, David Krmpotic] + * Add the gem load paths before the framework is loaded, so certain gems like RedCloth and BlueCloth can be frozen. * Fix discrepancies with loading rails/init.rb from gems. diff --git a/railties/bin/about b/railties/bin/about index cd38a32abf..ed8deb0dfc 100644 --- a/railties/bin/about +++ b/railties/bin/about @@ -1,3 +1,4 @@ #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' -require 'commands/about' +$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info" +require 'commands/about' \ No newline at end of file diff --git a/railties/lib/commands/about.rb b/railties/lib/commands/about.rb index 313bc18c6a..7f53ac8a2e 100644 --- a/railties/lib/commands/about.rb +++ b/railties/lib/commands/about.rb @@ -1,2 +1,3 @@ require 'environment' +require 'rails/info' puts Rails::Info -- cgit v1.2.3