Skip to content
Browse files

abort generation/booting on Ruby 1.9.1

  • Loading branch information...
1 parent 7cb49f5 commit 61fc7a455099f179de88967f403f2038b9d3c821 @fxn fxn committed Jun 10, 2010
View
1 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]
View
4 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.
@frankjmattia
frankjmattia added a note Jun 11, 2010

I'm not typically a grammatical nazi however this jumped out at me. Please accept my apologies as I know this doesn't contribute to making Ruby a better framework. I was just perusing the commits to see what was new and stumbled upon it. I hope no offense is taken.

TIP: Note ... p248 and p249 have marshaling bugs ... Enterprise Edition has fixed these since release 1.8.7-2010.02.

@fxn
Ruby on Rails member
fxn added a note Jun 11, 2010

Hey Frank thank you very much, it is fixed now in docrails (soon merged into master).

Any kind of grammar/typo corrections are very much appreciated, documentation should have several characteristics, and correct English is one of them.

Please if you see more errors feel free to clone docrails and commit fixes yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
h4. Rails Application object
View
2 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
View
6 railties/lib/rails/ruby_version_check.rb
@@ -7,4 +7,10 @@
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.
@KieranP
KieranP added a note Jun 10, 2010

Would probably be best to tell users why, and give them the option of 1.8.7. i.e.

"Due to segfaults caused by Ruby 1.9.1, Rails 3 is unable to boot up. Please either downgrade to Ruby 1.8.7 or upgrade to Ruby 1.9.2."

@KieranP
KieranP added a note Jun 10, 2010

Oh, and change the errors above it too, i.e.:

"Rails requires Ruby version #{min_release} or later."

A user on 1.8.6 might upgrade to 1.9.1 and then need to upgrade to 1.9.2. Might anger them.

Something like this should do the trick:

"Rails requires Ruby version 1.8.7 or 1.9.2 or later to function properly."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
+ EOS
end
View
4 railties/test/application/initializers/check_ruby_version_test.rb
@@ -9,9 +9,11 @@ def setup
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

0 comments on commit 61fc7a4

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