aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-06-10 21:46:42 +0200
committerXavier Noria <fxn@hashref.com>2010-06-10 21:49:45 +0200
commit61fc7a455099f179de88967f403f2038b9d3c821 (patch)
tree7e5af80845111f1c871f6415ccd975186301fc74
parent7cb49f551c3207a0e2f03eaf31cd5a620b49bd4e (diff)
downloadrails-61fc7a455099f179de88967f403f2038b9d3c821.tar.gz
rails-61fc7a455099f179de88967f403f2038b9d3c821.tar.bz2
rails-61fc7a455099f179de88967f403f2038b9d3c821.zip
abort generation/booting on Ruby 1.9.1
-rw-r--r--railties/CHANGELOG1
-rw-r--r--railties/guides/source/3_0_release_notes.textile4
-rw-r--r--railties/guides/source/getting_started.textile2
-rw-r--r--railties/lib/rails/ruby_version_check.rb6
-rw-r--r--railties/test/application/initializers/check_ruby_version_test.rb4
5 files changed, 13 insertions, 4 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 51bd4abd70..c33a4d11dd 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,6 @@
*Rails 3.0.0 [Release Candidate] (unreleased)*
+* Abort generation/booting on Ruby 1.9.1. [fxn]
* Made the rails command work even when you're in a subdirectory [Chad Fowler]
diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile
index 41ea5d5822..cc6b84b814 100644
--- a/railties/guides/source/3_0_release_notes.textile
+++ b/railties/guides/source/3_0_release_notes.textile
@@ -32,11 +32,11 @@ h3. Upgrading to Rails 3
If you're upgrading an existing application, it's a great idea to have good test coverage before going in. You should also first upgrade to Rails 2.3.5 and make sure your application still runs as expected before attempting to update to Rails 3. Then take heed of the following changes:
-h4. Rails 3 requires Ruby 1.8.7+
+h4. Rails 3 requires at least Ruby 1.8.7
Rails 3.0 requires Ruby 1.8.7 or higher. Support for all of the previous Ruby versions has been dropped officially and you should upgrade as early as possible. Rails 3.0 is also compatible with Ruby 1.9.2.
-TIP: Note that Ruby 1.8.7 p248 and p249 has marshaling bugs that crash Rails 3.0.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing.
+TIP: Note that Ruby 1.8.7 p248 and p249 has marshaling bugs that crash Rails 3.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing.
h4. Rails Application object
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index 6edf07fd65..7d01759446 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -17,7 +17,7 @@ This guide is designed for beginners who want to get started with a Rails applic
* The "Ruby":http://www.ruby-lang.org/en/downloads language version 1.8.7 or higher
-TIP: Note that Ruby 1.8.7 p248 and p249 has marshaling bugs that crash Rails 3.0.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing.
+TIP: Note that Ruby 1.8.7 p248 and p249 has marshaling bugs that crash Rails 3.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing.
* The "RubyGems":http://rubyforge.org/frs/?group_id=126 packaging system
* A working installation of the "SQLite3 Database":http://www.sqlite.org
diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb
index 62d7804bf3..3b37c41c29 100644
--- a/railties/lib/rails/ruby_version_check.rb
+++ b/railties/lib/rails/ruby_version_check.rb
@@ -7,4 +7,10 @@ if ruby_release < min_release
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
diff --git a/railties/test/application/initializers/check_ruby_version_test.rb b/railties/test/application/initializers/check_ruby_version_test.rb
index 58782b2511..5b6196307d 100644
--- a/railties/test/application/initializers/check_ruby_version_test.rb
+++ b/railties/test/application/initializers/check_ruby_version_test.rb
@@ -9,9 +9,11 @@ module ApplicationTests
boot_rails
end
- test "rails initializes with ruby 1.8.7 or later" do
+ test "rails initializes with ruby 1.8.7 or later, except for 1.9.1" do
if RUBY_VERSION < '1.8.7'
assert_rails_does_not_boot
+ elsif RUBY_VERSION == '1.9.1'
+ assert_rails_does_not_boot
else
assert_rails_boots
end