Skip to content

Commit

Permalink
Single ruby version requirement message
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Jun 11, 2010
1 parent acad3ba commit 1a56548
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
3 changes: 2 additions & 1 deletion railties/lib/rails.rb
@@ -1,3 +1,5 @@
require 'rails/ruby_version_check'

require 'pathname'

require 'active_support'
Expand All @@ -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'
Expand Down
12 changes: 3 additions & 9 deletions 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')

This comment has been minimized.

Copy link
@rubys

rubys Jun 11, 2010

Contributor

$ 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.
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say they upgrade.

@jeremy
Copy link
Member Author

@jeremy jeremy commented on 1a56548 Jun 11, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stefan, fixed in be43ad6

@stefanpenner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

many thanks :D

@melito
Copy link

@melito melito commented on 1a56548 Jun 12, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

@norman norman commented on 1a56548 Jun 12, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.