unicorn-fotopedia 0.99.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. data/.CHANGELOG.old +25 -0
  2. data/.document +19 -0
  3. data/.gitignore +21 -0
  4. data/.mailmap +26 -0
  5. data/CONTRIBUTORS +32 -0
  6. data/COPYING +339 -0
  7. data/DESIGN +105 -0
  8. data/Documentation/.gitignore +5 -0
  9. data/Documentation/GNUmakefile +30 -0
  10. data/Documentation/unicorn.1.txt +171 -0
  11. data/Documentation/unicorn_rails.1.txt +172 -0
  12. data/FAQ +52 -0
  13. data/GIT-VERSION-GEN +40 -0
  14. data/GNUmakefile +292 -0
  15. data/HACKING +116 -0
  16. data/ISSUES +36 -0
  17. data/KNOWN_ISSUES +50 -0
  18. data/LICENSE +55 -0
  19. data/PHILOSOPHY +145 -0
  20. data/README +149 -0
  21. data/Rakefile +191 -0
  22. data/SIGNALS +109 -0
  23. data/Sandbox +78 -0
  24. data/TODO +5 -0
  25. data/TUNING +70 -0
  26. data/bin/unicorn +126 -0
  27. data/bin/unicorn_rails +203 -0
  28. data/examples/big_app_gc.rb +33 -0
  29. data/examples/echo.ru +27 -0
  30. data/examples/git.ru +13 -0
  31. data/examples/init.sh +58 -0
  32. data/examples/logger_mp_safe.rb +25 -0
  33. data/examples/nginx.conf +139 -0
  34. data/examples/unicorn.conf.rb +78 -0
  35. data/ext/unicorn_http/CFLAGS +13 -0
  36. data/ext/unicorn_http/c_util.h +124 -0
  37. data/ext/unicorn_http/common_field_optimization.h +111 -0
  38. data/ext/unicorn_http/ext_help.h +77 -0
  39. data/ext/unicorn_http/extconf.rb +14 -0
  40. data/ext/unicorn_http/global_variables.h +89 -0
  41. data/ext/unicorn_http/unicorn_http.rl +714 -0
  42. data/ext/unicorn_http/unicorn_http_common.rl +75 -0
  43. data/lib/unicorn.rb +847 -0
  44. data/lib/unicorn/app/exec_cgi.rb +150 -0
  45. data/lib/unicorn/app/inetd.rb +109 -0
  46. data/lib/unicorn/app/old_rails.rb +33 -0
  47. data/lib/unicorn/app/old_rails/static.rb +58 -0
  48. data/lib/unicorn/cgi_wrapper.rb +145 -0
  49. data/lib/unicorn/configurator.rb +421 -0
  50. data/lib/unicorn/const.rb +34 -0
  51. data/lib/unicorn/http_request.rb +72 -0
  52. data/lib/unicorn/http_response.rb +75 -0
  53. data/lib/unicorn/launcher.rb +65 -0
  54. data/lib/unicorn/oob_gc.rb +58 -0
  55. data/lib/unicorn/socket_helper.rb +152 -0
  56. data/lib/unicorn/tee_input.rb +217 -0
  57. data/lib/unicorn/util.rb +90 -0
  58. data/local.mk.sample +62 -0
  59. data/setup.rb +1586 -0
  60. data/t/.gitignore +2 -0
  61. data/t/GNUmakefile +67 -0
  62. data/t/README +42 -0
  63. data/t/bin/content-md5-put +36 -0
  64. data/t/bin/sha1sum.rb +23 -0
  65. data/t/bin/unused_listen +40 -0
  66. data/t/bin/utee +12 -0
  67. data/t/env.ru +3 -0
  68. data/t/my-tap-lib.sh +200 -0
  69. data/t/t0000-http-basic.sh +50 -0
  70. data/t/t0001-reload-bad-config.sh +52 -0
  71. data/t/t0002-config-conflict.sh +49 -0
  72. data/t/test-lib.sh +100 -0
  73. data/test/aggregate.rb +15 -0
  74. data/test/benchmark/README +50 -0
  75. data/test/benchmark/dd.ru +18 -0
  76. data/test/exec/README +5 -0
  77. data/test/exec/test_exec.rb +1038 -0
  78. data/test/rails/app-1.2.3/.gitignore +2 -0
  79. data/test/rails/app-1.2.3/Rakefile +7 -0
  80. data/test/rails/app-1.2.3/app/controllers/application.rb +6 -0
  81. data/test/rails/app-1.2.3/app/controllers/foo_controller.rb +36 -0
  82. data/test/rails/app-1.2.3/app/helpers/application_helper.rb +4 -0
  83. data/test/rails/app-1.2.3/config/boot.rb +11 -0
  84. data/test/rails/app-1.2.3/config/database.yml +12 -0
  85. data/test/rails/app-1.2.3/config/environment.rb +13 -0
  86. data/test/rails/app-1.2.3/config/environments/development.rb +9 -0
  87. data/test/rails/app-1.2.3/config/environments/production.rb +5 -0
  88. data/test/rails/app-1.2.3/config/routes.rb +6 -0
  89. data/test/rails/app-1.2.3/db/.gitignore +0 -0
  90. data/test/rails/app-1.2.3/public/404.html +1 -0
  91. data/test/rails/app-1.2.3/public/500.html +1 -0
  92. data/test/rails/app-2.0.2/.gitignore +2 -0
  93. data/test/rails/app-2.0.2/Rakefile +7 -0
  94. data/test/rails/app-2.0.2/app/controllers/application.rb +4 -0
  95. data/test/rails/app-2.0.2/app/controllers/foo_controller.rb +36 -0
  96. data/test/rails/app-2.0.2/app/helpers/application_helper.rb +4 -0
  97. data/test/rails/app-2.0.2/config/boot.rb +11 -0
  98. data/test/rails/app-2.0.2/config/database.yml +12 -0
  99. data/test/rails/app-2.0.2/config/environment.rb +17 -0
  100. data/test/rails/app-2.0.2/config/environments/development.rb +8 -0
  101. data/test/rails/app-2.0.2/config/environments/production.rb +5 -0
  102. data/test/rails/app-2.0.2/config/routes.rb +6 -0
  103. data/test/rails/app-2.0.2/db/.gitignore +0 -0
  104. data/test/rails/app-2.0.2/public/404.html +1 -0
  105. data/test/rails/app-2.0.2/public/500.html +1 -0
  106. data/test/rails/app-2.1.2/.gitignore +2 -0
  107. data/test/rails/app-2.1.2/Rakefile +7 -0
  108. data/test/rails/app-2.1.2/app/controllers/application.rb +4 -0
  109. data/test/rails/app-2.1.2/app/controllers/foo_controller.rb +36 -0
  110. data/test/rails/app-2.1.2/app/helpers/application_helper.rb +4 -0
  111. data/test/rails/app-2.1.2/config/boot.rb +111 -0
  112. data/test/rails/app-2.1.2/config/database.yml +12 -0
  113. data/test/rails/app-2.1.2/config/environment.rb +17 -0
  114. data/test/rails/app-2.1.2/config/environments/development.rb +7 -0
  115. data/test/rails/app-2.1.2/config/environments/production.rb +5 -0
  116. data/test/rails/app-2.1.2/config/routes.rb +6 -0
  117. data/test/rails/app-2.1.2/db/.gitignore +0 -0
  118. data/test/rails/app-2.1.2/public/404.html +1 -0
  119. data/test/rails/app-2.1.2/public/500.html +1 -0
  120. data/test/rails/app-2.2.2/.gitignore +2 -0
  121. data/test/rails/app-2.2.2/Rakefile +7 -0
  122. data/test/rails/app-2.2.2/app/controllers/application.rb +4 -0
  123. data/test/rails/app-2.2.2/app/controllers/foo_controller.rb +36 -0
  124. data/test/rails/app-2.2.2/app/helpers/application_helper.rb +4 -0
  125. data/test/rails/app-2.2.2/config/boot.rb +111 -0
  126. data/test/rails/app-2.2.2/config/database.yml +12 -0
  127. data/test/rails/app-2.2.2/config/environment.rb +17 -0
  128. data/test/rails/app-2.2.2/config/environments/development.rb +7 -0
  129. data/test/rails/app-2.2.2/config/environments/production.rb +5 -0
  130. data/test/rails/app-2.2.2/config/routes.rb +6 -0
  131. data/test/rails/app-2.2.2/db/.gitignore +0 -0
  132. data/test/rails/app-2.2.2/public/404.html +1 -0
  133. data/test/rails/app-2.2.2/public/500.html +1 -0
  134. data/test/rails/app-2.3.5/.gitignore +2 -0
  135. data/test/rails/app-2.3.5/Rakefile +7 -0
  136. data/test/rails/app-2.3.5/app/controllers/application_controller.rb +5 -0
  137. data/test/rails/app-2.3.5/app/controllers/foo_controller.rb +36 -0
  138. data/test/rails/app-2.3.5/app/helpers/application_helper.rb +4 -0
  139. data/test/rails/app-2.3.5/config/boot.rb +109 -0
  140. data/test/rails/app-2.3.5/config/database.yml +12 -0
  141. data/test/rails/app-2.3.5/config/environment.rb +17 -0
  142. data/test/rails/app-2.3.5/config/environments/development.rb +7 -0
  143. data/test/rails/app-2.3.5/config/environments/production.rb +6 -0
  144. data/test/rails/app-2.3.5/config/routes.rb +6 -0
  145. data/test/rails/app-2.3.5/db/.gitignore +0 -0
  146. data/test/rails/app-2.3.5/public/404.html +1 -0
  147. data/test/rails/app-2.3.5/public/500.html +1 -0
  148. data/test/rails/app-2.3.5/public/x.txt +1 -0
  149. data/test/rails/test_rails.rb +280 -0
  150. data/test/test_helper.rb +301 -0
  151. data/test/unit/test_configurator.rb +150 -0
  152. data/test/unit/test_http_parser.rb +555 -0
  153. data/test/unit/test_http_parser_ng.rb +443 -0
  154. data/test/unit/test_request.rb +184 -0
  155. data/test/unit/test_response.rb +110 -0
  156. data/test/unit/test_server.rb +291 -0
  157. data/test/unit/test_signals.rb +206 -0
  158. data/test/unit/test_socket_helper.rb +147 -0
  159. data/test/unit/test_tee_input.rb +257 -0
  160. data/test/unit/test_upload.rb +298 -0
  161. data/test/unit/test_util.rb +96 -0
  162. data/unicorn.gemspec +52 -0
  163. metadata +283 -0
@@ -0,0 +1,12 @@
1
+ development:
2
+ adapter: sqlite3
3
+ database: db/development.sqlite3
4
+ timeout: 5000
5
+ test:
6
+ adapter: sqlite3
7
+ database: db/test.sqlite3
8
+ timeout: 5000
9
+ production:
10
+ adapter: sqlite3
11
+ database: db/production.sqlite3
12
+ timeout: 5000
@@ -0,0 +1,17 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ unless defined? RAILS_GEM_VERSION
4
+ RAILS_GEM_VERSION = ENV['UNICORN_RAILS_VERSION']
5
+ end
6
+
7
+ # Bootstrap the Rails environment, frameworks, and default configuration
8
+ require File.join(File.dirname(__FILE__), 'boot')
9
+
10
+ Rails::Initializer.run do |config|
11
+ config.frameworks -= [ :action_web_service, :action_mailer ]
12
+ config.action_controller.session_store = :active_record_store
13
+ config.action_controller.session = {
14
+ :session_key => "_unicorn_rails_test.#{rand}",
15
+ :secret => "#{rand}#{rand}#{rand}#{rand}",
16
+ }
17
+ end
@@ -0,0 +1,7 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ config.cache_classes = false
4
+ config.whiny_nils = true
5
+ config.action_controller.consider_all_requests_local = true
6
+ config.action_controller.perform_caching = false
7
+ config.action_view.debug_rjs = true
@@ -0,0 +1,5 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ config.cache_classes = true
4
+ config.action_controller.consider_all_requests_local = false
5
+ config.action_controller.perform_caching = true
@@ -0,0 +1,6 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ ActionController::Routing::Routes.draw do |map|
4
+ map.connect ':controller/:action/:id.:format'
5
+ map.connect ':controller/:action/:id'
6
+ end
File without changes
@@ -0,0 +1 @@
1
+ 404 Not Found
@@ -0,0 +1 @@
1
+ 500 Internal Server Error
@@ -0,0 +1,2 @@
1
+ /tmp
2
+ /vendor
@@ -0,0 +1,7 @@
1
+ require(File.join(File.dirname(__FILE__), 'config', 'boot'))
2
+
3
+ require 'rake'
4
+ require 'rake/testtask'
5
+ require 'rake/rdoctask'
6
+
7
+ require 'tasks/rails'
@@ -0,0 +1,4 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ class ApplicationController < ActionController::Base
4
+ end
@@ -0,0 +1,36 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ require 'digest/sha1'
4
+ class FooController < ApplicationController
5
+ def index
6
+ render :text => "FOO\n"
7
+ end
8
+
9
+ def xcookie
10
+ cookies["foo"] = "cookie #$$"
11
+ render :text => ""
12
+ end
13
+
14
+ def xnotice
15
+ flash[:notice] = "session #$$"
16
+ render :text => ""
17
+ end
18
+
19
+ def xpost
20
+ if request.post?
21
+ digest = Digest::SHA1.new
22
+ out = "params: #{params.inspect}\n"
23
+ if file = params[:file]
24
+ loop do
25
+ buf = file.read(4096) or break
26
+ digest.update(buf)
27
+ end
28
+ out << "sha1: #{digest.to_s}\n"
29
+ end
30
+ headers['content-type'] = 'text/plain'
31
+ render :text => out
32
+ else
33
+ render :status => 403, :text => "need post\n"
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,4 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ module ApplicationHelper
4
+ end
@@ -0,0 +1,111 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ # Don't change this file!
4
+ # Configure your app in config/environment.rb and config/environments/*.rb
5
+
6
+ RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
7
+
8
+ module Rails
9
+ class << self
10
+ def boot!
11
+ unless booted?
12
+ preinitialize
13
+ pick_boot.run
14
+ end
15
+ end
16
+
17
+ def booted?
18
+ defined? Rails::Initializer
19
+ end
20
+
21
+ def pick_boot
22
+ (vendor_rails? ? VendorBoot : GemBoot).new
23
+ end
24
+
25
+ def vendor_rails?
26
+ File.exist?("#{RAILS_ROOT}/vendor/rails")
27
+ end
28
+
29
+ def preinitialize
30
+ load(preinitializer_path) if File.exist?(preinitializer_path)
31
+ end
32
+
33
+ def preinitializer_path
34
+ "#{RAILS_ROOT}/config/preinitializer.rb"
35
+ end
36
+ end
37
+
38
+ class Boot
39
+ def run
40
+ load_initializer
41
+ Rails::Initializer.run(:set_load_path)
42
+ end
43
+ end
44
+
45
+ class VendorBoot < Boot
46
+ def load_initializer
47
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
48
+ Rails::Initializer.run(:install_gem_spec_stubs)
49
+ end
50
+ end
51
+
52
+ class GemBoot < Boot
53
+ def load_initializer
54
+ self.class.load_rubygems
55
+ load_rails_gem
56
+ require 'initializer'
57
+ end
58
+
59
+ def load_rails_gem
60
+ if version = self.class.gem_version
61
+ gem 'rails', version
62
+ else
63
+ gem 'rails'
64
+ end
65
+ rescue Gem::LoadError => load_error
66
+ $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
67
+ exit 1
68
+ end
69
+
70
+ class << self
71
+ def rubygems_version
72
+ Gem::RubyGemsVersion rescue nil
73
+ end
74
+
75
+ def gem_version
76
+ if defined? RAILS_GEM_VERSION
77
+ RAILS_GEM_VERSION
78
+ elsif ENV.include?('RAILS_GEM_VERSION')
79
+ ENV['RAILS_GEM_VERSION']
80
+ else
81
+ parse_gem_version(read_environment_rb)
82
+ end
83
+ end
84
+
85
+ def load_rubygems
86
+ require 'rubygems'
87
+ min_version = '1.3.1'
88
+ unless rubygems_version >= min_version
89
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
90
+ exit 1
91
+ end
92
+
93
+ rescue LoadError
94
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
95
+ exit 1
96
+ end
97
+
98
+ def parse_gem_version(text)
99
+ $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
100
+ end
101
+
102
+ private
103
+ def read_environment_rb
104
+ File.read("#{RAILS_ROOT}/config/environment.rb")
105
+ end
106
+ end
107
+ end
108
+ end
109
+
110
+ # All that for this:
111
+ Rails.boot!
@@ -0,0 +1,12 @@
1
+ development:
2
+ adapter: sqlite3
3
+ database: db/development.sqlite3
4
+ timeout: 5000
5
+ test:
6
+ adapter: sqlite3
7
+ database: db/test.sqlite3
8
+ timeout: 5000
9
+ production:
10
+ adapter: sqlite3
11
+ database: db/production.sqlite3
12
+ timeout: 5000
@@ -0,0 +1,17 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ unless defined? RAILS_GEM_VERSION
4
+ RAILS_GEM_VERSION = ENV['UNICORN_RAILS_VERSION']
5
+ end
6
+
7
+ # Bootstrap the Rails environment, frameworks, and default configuration
8
+ require File.join(File.dirname(__FILE__), 'boot')
9
+
10
+ Rails::Initializer.run do |config|
11
+ config.frameworks -= [ :action_web_service, :action_mailer ]
12
+ config.action_controller.session_store = :active_record_store
13
+ config.action_controller.session = {
14
+ :session_key => "_unicorn_rails_test.#{rand}",
15
+ :secret => "#{rand}#{rand}#{rand}#{rand}",
16
+ }
17
+ end
@@ -0,0 +1,7 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ config.cache_classes = false
4
+ config.whiny_nils = true
5
+ config.action_controller.consider_all_requests_local = true
6
+ config.action_controller.perform_caching = false
7
+ config.action_view.debug_rjs = true
@@ -0,0 +1,5 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ config.cache_classes = true
4
+ config.action_controller.consider_all_requests_local = false
5
+ config.action_controller.perform_caching = true
@@ -0,0 +1,6 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ ActionController::Routing::Routes.draw do |map|
4
+ map.connect ':controller/:action/:id.:format'
5
+ map.connect ':controller/:action/:id'
6
+ end
File without changes
@@ -0,0 +1 @@
1
+ 404 Not Found
@@ -0,0 +1 @@
1
+ 500 Internal Server Error
@@ -0,0 +1,2 @@
1
+ /tmp
2
+ /vendor
@@ -0,0 +1,7 @@
1
+ require(File.join(File.dirname(__FILE__), 'config', 'boot'))
2
+
3
+ require 'rake'
4
+ require 'rake/testtask'
5
+ require 'rake/rdoctask'
6
+
7
+ require 'tasks/rails'
@@ -0,0 +1,5 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ class ApplicationController < ActionController::Base
4
+ helper :all
5
+ end
@@ -0,0 +1,36 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ require 'digest/sha1'
4
+ class FooController < ApplicationController
5
+ def index
6
+ render :text => "FOO\n"
7
+ end
8
+
9
+ def xcookie
10
+ cookies["foo"] = "cookie-#$$-#{session[:gotta_use_the_session_in_2_3]}"
11
+ render :text => ""
12
+ end
13
+
14
+ def xnotice
15
+ flash[:notice] = "session #$$"
16
+ render :text => ""
17
+ end
18
+
19
+ def xpost
20
+ if request.post?
21
+ digest = Digest::SHA1.new
22
+ out = "params: #{params.inspect}\n"
23
+ if file = params[:file]
24
+ loop do
25
+ buf = file.read(4096) or break
26
+ digest.update(buf)
27
+ end
28
+ out << "sha1: #{digest.to_s}\n"
29
+ end
30
+ headers['content-type'] = 'text/plain'
31
+ render :text => out
32
+ else
33
+ render :status => 403, :text => "need post\n"
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,4 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ module ApplicationHelper
4
+ end
@@ -0,0 +1,109 @@
1
+ # -*- encoding: binary -*-
2
+
3
+ RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
4
+
5
+ module Rails
6
+ class << self
7
+ def boot!
8
+ unless booted?
9
+ preinitialize
10
+ pick_boot.run
11
+ end
12
+ end
13
+
14
+ def booted?
15
+ defined? Rails::Initializer
16
+ end
17
+
18
+ def pick_boot
19
+ (vendor_rails? ? VendorBoot : GemBoot).new
20
+ end
21
+
22
+ def vendor_rails?
23
+ File.exist?("#{RAILS_ROOT}/vendor/rails")
24
+ end
25
+
26
+ def preinitialize
27
+ load(preinitializer_path) if File.exist?(preinitializer_path)
28
+ end
29
+
30
+ def preinitializer_path
31
+ "#{RAILS_ROOT}/config/preinitializer.rb"
32
+ end
33
+ end
34
+
35
+ class Boot
36
+ def run
37
+ load_initializer
38
+ Rails::Initializer.run(:set_load_path)
39
+ end
40
+ end
41
+
42
+ class VendorBoot < Boot
43
+ def load_initializer
44
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
45
+ Rails::Initializer.run(:install_gem_spec_stubs)
46
+ Rails::GemDependency.add_frozen_gem_path
47
+ end
48
+ end
49
+
50
+ class GemBoot < Boot
51
+ def load_initializer
52
+ self.class.load_rubygems
53
+ load_rails_gem
54
+ require 'initializer'
55
+ end
56
+
57
+ def load_rails_gem
58
+ if version = self.class.gem_version
59
+ gem 'rails', version
60
+ else
61
+ gem 'rails'
62
+ end
63
+ rescue Gem::LoadError => load_error
64
+ $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
65
+ exit 1
66
+ end
67
+
68
+ class << self
69
+ def rubygems_version
70
+ Gem::RubyGemsVersion rescue nil
71
+ end
72
+
73
+ def gem_version
74
+ if defined? RAILS_GEM_VERSION
75
+ RAILS_GEM_VERSION
76
+ elsif ENV.include?('RAILS_GEM_VERSION')
77
+ ENV['RAILS_GEM_VERSION']
78
+ else
79
+ parse_gem_version(read_environment_rb)
80
+ end
81
+ end
82
+
83
+ def load_rubygems
84
+ require 'rubygems'
85
+ min_version = '1.3.1'
86
+ unless rubygems_version >= min_version
87
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
88
+ exit 1
89
+ end
90
+
91
+ rescue LoadError
92
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
93
+ exit 1
94
+ end
95
+
96
+ def parse_gem_version(text)
97
+ $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
98
+ end
99
+
100
+ private
101
+ def read_environment_rb
102
+ File.read("#{RAILS_ROOT}/config/environment.rb")
103
+ end
104
+ end
105
+ end
106
+ end
107
+
108
+ # All that for this:
109
+ Rails.boot!