diff options
Diffstat (limited to 'www/rails/patches')
-rw-r--r-- | www/rails/patches/patch-ab | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/www/rails/patches/patch-ab b/www/rails/patches/patch-ab index 00099cf915c..f5347655c29 100644 --- a/www/rails/patches/patch-ab +++ b/www/rails/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.1.1.1 2006/10/12 08:36:22 minskim Exp $ +$NetBSD: patch-ab,v 1.2 2007/01/28 05:45:09 minskim Exp $ ---- environments/boot.rb.orig 2006-08-10 10:34:33.000000000 -0700 +--- environments/boot.rb.orig 2007-01-18 13:37:44.000000000 -0800 +++ environments/boot.rb -@@ -15,29 +15,7 @@ unless defined?(Rails::Initializer) +@@ -15,30 +15,7 @@ unless defined?(Rails::Initializer) if File.directory?("#{RAILS_ROOT}/vendor/rails") require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" else @@ -13,13 +13,14 @@ $NetBSD: patch-ab,v 1.1.1.1 2006/10/12 08:36:22 minskim Exp $ - rails_gem_version = $1 - - if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version -- rails_gem = Gem.cache.search('rails', "=#{version}").first +- # Asking for 1.1.6 will give you 1.1.6.5206, if available -- makes it easier to use beta gems +- rails_gem = Gem.cache.search('rails', "~>#{version}.0").sort_by { |g| g.version.version }.last - - if rails_gem -- require_gem "rails", "=#{version}" +- require_gem "rails", "=#{rails_gem.version.version}" - require rails_gem.full_gem_path + '/lib/initializer' - else -- STDERR.puts %(Cannot find gem for Rails =#{version}: +- STDERR.puts %(Cannot find gem for Rails ~>#{version}.0: - Install the missing gem with 'gem install -v=#{version} rails', or - change environment.rb to define RAILS_GEM_VERSION with your desired version. - ) |