Skip to content
Browse files

Single ruby version requirement message

  • Loading branch information...
1 parent acad3ba commit 1a5654851e23b081c331bb3a7e0d0ffc2c2d6e51 @jeremy jeremy committed Jun 11, 2010
Showing with 5 additions and 10 deletions.
  1. +2 −1 railties/lib/rails.rb
  2. +3 −9 railties/lib/rails/ruby_version_check.rb
View
3 railties/lib/rails.rb
@@ -1,3 +1,5 @@
+require 'rails/ruby_version_check'
+
require 'pathname'
require 'active_support'
@@ -8,7 +10,6 @@
require 'rails/version'
require 'rails/deprecation'
require 'rails/log_subscriber'
-require 'rails/ruby_version_check'
require 'active_support/railtie'
require 'action_dispatch/railtie'
View
12 railties/lib/rails/ruby_version_check.rb
@@ -1,16 +1,10 @@
-min_release = "1.8.7"
ruby_release = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
-if ruby_release < min_release
+if ruby_release < '1.8.7' || (ruby_release > '1.8' && ruby_release < '1.9.2')
@rubys
rubys added a note Jun 11, 2010

$ ruby /home/rubys/git/rails/bin/rails -v

Rails 3 requires Ruby 1.8.7 or 1.9.2.

You're running 1.8.7 (2010-01-10); please upgrade to continue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
abort <<-end_message
- Rails requires Ruby version #{min_release} or later.
+ Rails 3 requires Ruby 1.8.7 or 1.9.2.
+
You're running #{ruby_release}; please upgrade to continue.
end_message
-elsif RUBY_VERSION == '1.9.1'
- abort <<-EOS
-
- Rails 3 does not work with Ruby 1.9.1. Please upgrade to 1.9.2.
-
- EOS
end

6 comments on commit 1a56548

@stefanpenner

What about people running ruby_release = '1.8.7' ? [sorry edited <= to =]

Example:
ruby -v
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.3.0], MBARI 0x6770, Ruby Enterprise Edition 2010.01

rails s
Rails 3 requires Ruby 1.8.7 or 1.9.2.
You're running 1.8.7 (2009-12-24); please upgrade to continue.

@dmathieu

I'd say they upgrade.

@jeremy
Ruby on Rails member
jeremy commented on 1a56548 Jun 11, 2010

Stefan, fixed in be43ad6

@stefanpenner

many thanks :D

@melito
melito commented on 1a56548 Jun 12, 2010

Is there a thread with more info about the 1.9.1 problems?

I've been using 1.9.1p378 with Rails 3 from beta1 to beta3
Should I expect things to break if I bump to beta4 ?

@norman
norman commented on 1a56548 Jun 12, 2010

@melito Not sure about beta4 but edge currently doesn't work on 1.9.1. I'd recommend using 1.9.2-head since it will be released pretty soon, and the Rails test suite makes 1.9.1 segfault. I recently discussed the issue with some of the Rails guys and they feel pretty strongly that supporting 1.9.1 will not be worth the effort given the imminent release of 1.9.2.

Please sign in to comment.
Something went wrong with that request. Please try again.