From cc1efe7e5af32789a9ed0f80528e629861dbe6a7 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Mon, 31 Aug 2009 17:58:54 -0500 Subject: Rails::Info doesn't require version for unwanted frameworks [#3124 state:committed] Signed-off-by: Jeremy Kemper --- railties/builtin/rails_info/rails/info.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'railties/builtin/rails_info') diff --git a/railties/builtin/rails_info/rails/info.rb b/railties/builtin/rails_info/rails/info.rb index fdacc469f5..aabe976d4e 100644 --- a/railties/builtin/rails_info/rails/info.rb +++ b/railties/builtin/rails_info/rails/info.rb @@ -29,8 +29,10 @@ module Rails end def framework_version(framework) - require "#{framework}/version" - "#{framework.classify}::VERSION::STRING".constantize + if Object.const_defined?(framework.classify) + require "#{framework}/version" + "#{framework.classify}::VERSION::STRING".constantize + end end def edge_rails_revision(info = git_info) -- cgit v1.2.3