Skip to content

Commit

Permalink
Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 wi…
Browse files Browse the repository at this point in the history
…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
dhh committed Nov 23, 2006
1 parent 3805c12 commit 958e9a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN* *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] * Update to Prototype and script.aculo.us [5579]. [Thomas Fuchs]


* Made script/server work with -e and -d when using Mongrel [DHH] * Made script/server work with -e and -d when using Mongrel [DHH]
Expand Down
3 changes: 2 additions & 1 deletion railties/environments/boot.rb
Expand Up @@ -22,7 +22,8 @@
rails_gem_version = $1 rails_gem_version = $1


if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version 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 if rails_gem
require_gem "rails", "=#{version}" require_gem "rails", "=#{version}"
Expand Down

0 comments on commit 958e9a3

Please sign in to comment.