]>
Commit | Line | Data |
---|---|---|
681e9caf | 1 | diff -ur apache-mod_rails-3.0.0-o//Rakefile apache-mod_rails-3.0.0/Rakefile |
2 | --- apache-mod_rails-3.0.0-o//Rakefile 2010-10-18 14:08:19.000000000 +0200 | |
3 | +++ apache-mod_rails-3.0.0/Rakefile 2010-11-25 01:20:28.000000000 +0100 | |
4 | @@ -29,7 +29,6 @@ | |
5 | require 'build/apache2' | |
6 | require 'build/nginx' | |
7 | require 'build/documentation' | |
8 | -require 'build/packaging' | |
9 | require 'build/test_basics' | |
10 | require 'build/oxt_tests' | |
11 | require 'build/cxx_tests' | |
12 | diff -ur apache-mod_rails-3.0.0-o//build/basics.rb apache-mod_rails-3.0.0/build/basics.rb | |
13 | --- apache-mod_rails-3.0.0-o//build/basics.rb 2010-10-18 14:08:19.000000000 +0200 | |
14 | +++ apache-mod_rails-3.0.0/build/basics.rb 2010-11-25 01:20:28.000000000 +0100 | |
15 | @@ -14,7 +14,6 @@ | |
16 | # with this program; if not, write to the Free Software Foundation, Inc., | |
17 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
59562032 | 18 | |
59562032 | 19 | -require 'rubygems' |
20 | require 'pathname' | |
681e9caf | 21 | require 'phusion_passenger' |
22 | require 'phusion_passenger/packaging' | |
23 | @@ -32,8 +31,6 @@ | |
4e15a504 | 24 | include PhusionPassenger |
681e9caf | 25 | include PhusionPassenger::PlatformInfo |
59562032 | 26 | |
681e9caf | 27 | -require 'build/packagetask' |
28 | -require 'build/gempackagetask' | |
29 | require 'build/rake_extensions' | |
30 | require 'build/cplusplus_support' | |
59562032 | 31 | |
681e9caf | 32 | diff -ur apache-mod_rails-3.0.0-o//helper-scripts/passenger-spawn-server apache-mod_rails-3.0.0/helper-scripts/passenger-spawn-server |
33 | --- apache-mod_rails-3.0.0-o//helper-scripts/passenger-spawn-server 2010-10-18 14:08:19.000000000 +0200 | |
34 | +++ apache-mod_rails-3.0.0/helper-scripts/passenger-spawn-server 2010-11-25 01:22:03.000000000 +0100 | |
35 | @@ -72,7 +72,10 @@ | |
36 | ||
37 | source_root = File.expand_path(File.dirname(__FILE__) + "/..") | |
38 | $LOAD_PATH.unshift("#{source_root}/lib") | |
39 | - require 'rubygems' rescue nil | |
40 | + begin | |
41 | + require 'rubygems' | |
42 | + rescue LoadError | |
43 | + end | |
44 | require 'phusion_passenger' | |
45 | require 'phusion_passenger/debug_logging' | |
46 | require 'phusion_passenger/utils/tmpdir' | |
47 | Only in apache-mod_rails-3.0.0/helper-scripts: passenger-spawn-server~ | |
48 | diff -ur apache-mod_rails-3.0.0-o//lib/phusion_passenger/abstract_server.rb apache-mod_rails-3.0.0/lib/phusion_passenger/abstract_server.rb | |
49 | --- apache-mod_rails-3.0.0-o//lib/phusion_passenger/abstract_server.rb 2010-10-18 14:08:19.000000000 +0200 | |
50 | +++ apache-mod_rails-3.0.0/lib/phusion_passenger/abstract_server.rb 2010-11-25 01:22:28.000000000 +0100 | |
51 | @@ -172,7 +172,7 @@ | |
52 | # the associated file descriptors have just been closed. This can | |
53 | # result in mysterious 'EBADFD' errors. So we force RubyGems to | |
54 | # clear all open file handles. | |
55 | - Gem.clear_paths | |
56 | + Gem.clear_paths if defined? Gem | |
57 | ||
58 | # Reseed pseudo-random number generator for security reasons. | |
59 | srand | |
60 | Only in apache-mod_rails-3.0.0/lib/phusion_passenger: abstract_server.rb~ | |
61 | diff -ur apache-mod_rails-3.0.0-o//lib/phusion_passenger/app_process.rb apache-mod_rails-3.0.0/lib/phusion_passenger/app_process.rb | |
62 | --- apache-mod_rails-3.0.0-o//lib/phusion_passenger/app_process.rb 2010-10-18 14:08:19.000000000 +0200 | |
63 | +++ apache-mod_rails-3.0.0/lib/phusion_passenger/app_process.rb 2010-11-25 01:20:28.000000000 +0100 | |
fecd8094 | 64 | @@ -21,7 +21,10 @@ |
65 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
66 | # THE SOFTWARE. | |
67 | ||
68 | -require 'rubygems' | |
69 | +begin | |
681e9caf | 70 | + require 'rubygems' |
fecd8094 | 71 | +rescue LoadError |
72 | +end | |
73 | require 'phusion_passenger/exceptions' | |
74 | module PhusionPassenger | |
75 | ||
681e9caf | 76 | @@ -63,6 +66,7 @@ |
77 | return :vendor | |
fecd8094 | 78 | end |
681e9caf | 79 | |
80 | + return nil if !defined? Gem | |
81 | environment_rb = File.read("#{app_root}/config/environment.rb") | |
82 | environment_rb =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/ | |
83 | gem_version_spec = $1 | |
84 | diff -ur apache-mod_rails-3.0.0-o//lib/phusion_passenger/spawn_manager.rb apache-mod_rails-3.0.0/lib/phusion_passenger/spawn_manager.rb | |
85 | --- apache-mod_rails-3.0.0-o//lib/phusion_passenger/spawn_manager.rb 2010-10-18 14:08:19.000000000 +0200 | |
86 | +++ apache-mod_rails-3.0.0/lib/phusion_passenger/spawn_manager.rb 2010-11-25 01:20:28.000000000 +0100 | |
87 | @@ -282,12 +282,12 @@ | |
88 | send_error_page(client, 'database_error', :error => e, | |
89 | :app_root => app_root, :app_name => app_name(app_type), | |
90 | :app_type => app_type) | |
91 | - elsif load_error?(e) | |
92 | + elsif load_error?(e) and defined? Gem | |
93 | # A source file failed to load, maybe because of a | |
fecd8094 | 94 | # missing gem. If that's the case then the sysadmin |
95 | # will install probably the gem. So we clear RubyGems's | |
96 | # cache so that it can detect new gems. | |
97 | - Gem.clear_paths | |
98 | + Gem.clear_paths if defined? Gem | |
99 | send_error_page(client, 'load_error', :error => e, :app_root => app_root, | |
100 | :app_name => app_name(app_type)) | |
101 | elsif e.child_exception.is_a?(SystemExit) | |
681e9caf | 102 | diff -ur apache-mod_rails-3.0.0-o//lib/phusion_passenger/utils.rb apache-mod_rails-3.0.0/lib/phusion_passenger/utils.rb |
103 | --- apache-mod_rails-3.0.0-o//lib/phusion_passenger/utils.rb 2010-10-18 14:08:19.000000000 +0200 | |
104 | +++ apache-mod_rails-3.0.0/lib/phusion_passenger/utils.rb 2010-11-25 01:20:28.000000000 +0100 | |
fecd8094 | 105 | @@ -22,7 +22,10 @@ |
106 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
107 | # THE SOFTWARE. | |
108 | ||
109 | -require 'rubygems' | |
110 | +begin | |
111 | + require 'rubygems' | |
112 | +rescue LoadError | |
113 | +end | |
114 | require 'thread' | |
115 | if (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") && RUBY_VERSION < "1.8.7" | |
116 | require 'fastthread' | |
681e9caf | 117 | @@ -244,7 +247,7 @@ |
118 | # Make sure RubyGems uses any new environment variable values | |
119 | # that have been set now (e.g. $HOME, $GEM_HOME, etc) and that | |
120 | # it is able to detect newly installed gems. | |
121 | - Gem.clear_paths | |
122 | + Gem.clear_paths if defined? Gem | |
123 | ||
124 | # Because spawned app processes exit using #exit!, #at_exit | |
125 | # blocks aren't called. Here we ninja patch Kernel so that |