Skip to content

Commit

Permalink
abort generation/booting on Ruby 1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Jun 10, 2010
1 parent 7cb49f5 commit 61fc7a4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions 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]


Expand Down
4 changes: 2 additions & 2 deletions railties/guides/source/3_0_release_notes.textile
Expand Up @@ -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.

This comment has been minimized.

Copy link
@frankjmattia

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

This comment has been minimized.

Copy link
@fxn

fxn Jun 11, 2010

Author Member

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.


h4. Rails Application object

Expand Down
2 changes: 1 addition & 1 deletion railties/guides/source/getting_started.textile
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions railties/lib/rails/ruby_version_check.rb
Expand Up @@ -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.

This comment has been minimized.

Copy link
@KieranP

KieranP 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."

This comment has been minimized.

Copy link
@KieranP

KieranP 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."

EOS
end
Expand Up @@ -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
Expand Down

0 comments on commit 61fc7a4

Please sign in to comment.