diff options
Diffstat (limited to 'railties/environments')
-rw-r--r-- | railties/environments/boot.rb | 2 | ||||
-rw-r--r-- | railties/environments/environment.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/environments/boot.rb b/railties/environments/boot.rb index ff4266ac8a..e638abe1a2 100644 --- a/railties/environments/boot.rb +++ b/railties/environments/boot.rb @@ -14,7 +14,7 @@ if File.directory?("#{RAILS_ROOT}/vendor/rails") else require 'rubygems' - if !defined?(RAILS_GEM_VERSION) && File.read(File.dirname(__FILE__) + '/environment.rb') =~ /RAILS_GEM_VERSION = '([\d.]+)'/ + if !defined?(RAILS_GEM_VERSION) && File.read(File.dirname(__FILE__) + '/environment.rb') =~ /^\s*RAILS_GEM_VERSION = '([\d.]+)'/ RAILS_GEM_VERSION = $1 end diff --git a/railties/environments/environment.rb b/railties/environments/environment.rb index 839da1c53d..1dbfbcb3cf 100644 --- a/railties/environments/environment.rb +++ b/railties/environments/environment.rb @@ -5,7 +5,7 @@ # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present -<%= '# ' if freeze %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' +<%= '# ' if freeze %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') |