From 6d5099fcfff9a797608c60b56c13c7ec23af304a Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Fri, 24 Jul 2009 15:57:56 -0300 Subject: [PATCH] ActionItem1178: using Debian-installed Rails --- config/boot.rb | 13 +++++++++++++ config/environment.rb | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/config/boot.rb b/config/boot.rb index cd21fb9..484c2b5 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -105,5 +105,18 @@ module Rails end end +# yeah, I know, I shouldn't change this file. But ... +def install_debian_rails + local_rails = File.dirname(__FILE__) + '/../vendor/rails' + debian_rails = '/usr/share/rails' + if !File.exist?(local_rails) && File.exists?(debian_rails) + puts "I: Installing Debian-installed Rails from /usr/share/rails into vendor/rails." + recommended_rails_version = Rails::GemBoot.gem_version + puts "I: Please note that the recommended Rails version is #{recommended_rails_version}, and that other versions might not work" + File.symlink(debian_rails, local_rails) + end +end +install_debian_rails + # All that for this: Rails.boot! diff --git a/config/environment.rb b/config/environment.rb index e1703d0..fa93739 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -5,7 +5,7 @@ #ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present -RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION +RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') -- libgit2 0.21.2