Permalink
Browse files

Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 wi…

…ll give you 1.1.6.4520 if available [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5614 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 3805c12 commit 958e9a36a9b5929f9cd28b15a4d50d6d3f821e18 @dhh dhh committed Nov 23, 2006
Showing with 4 additions and 1 deletion.
  1. +2 −0 railties/CHANGELOG
  2. +2 −1 railties/environments/boot.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [DHH]
+
* Update to Prototype and script.aculo.us [5579]. [Thomas Fuchs]
* Made script/server work with -e and -d when using Mongrel [DHH]
@@ -22,7 +22,8 @@
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}"

0 comments on commit 958e9a3

Please sign in to comment.