提交 f819b90a 编写于 作者: O Oscar Del Ben

[Guides] Update ruby version check

上级 f2c60c79
......@@ -544,13 +544,19 @@ First off the line is the +rails+ require itself.
h4. +railties/lib/rails.rb+
This file is responsible for the initial definition of the +Rails+ module and, rather than defining the autoloads like +ActiveSupport+, +ActionDispatch+ and so on, it actually defines other functionality. Such as the +root+, +env+ and +application+ methods which are extremely useful in Rails 3 applications.
This file is responsible for the initial definition of the +Rails+
module and, rather than defining the autoloads like +ActiveSupport+,
+ActionDispatch+ and so on, it actually defines other functionality.
Such as the +root+, +env+ and +application+ methods which are extremely
useful in Rails 4 applications.
However, before all that takes place the +rails/ruby_version_check+ file is required first.
h4. +railties/lib/rails/ruby_version_check.rb+
This file simply checks if the Ruby version is less than 1.8.7 or is 1.9.1 and raises an error if that is the case. Rails 3 simply will not run on earlier versions of Ruby than 1.8.7 or 1.9.1.
This file simply checks if the Ruby version is less than 1.9.3 and
raises an error if that is the case. Rails 4 simply will not run on
earlier versions of Ruby 1.9.3
NOTE: You should always endeavor to run the latest version of Ruby with your Rails applications. The benefits are many, including security fixes and the like, and very often there is a speed increase associated with it. The caveat is that you could have code that potentially breaks on the latest version, which should be fixed to work on the latest version rather than kept around as an excuse not to upgrade.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册