Browse files

Document Bundler support

  • Loading branch information...
1 parent 7bf18a0 commit 3fc6071926ed35bf073420a004b1f4aa29a1e847 @FooBarWidget FooBarWidget committed May 7, 2010
Showing with 32 additions and 1 deletion.
  1. +4 −1 NEWS
  2. +28 −0 doc/users_guide_snippets/tips.txt
@@ -3,7 +3,10 @@ Release 2.2.12
* Improved Bundler support.
Previous versions might not be able to correctly load gems bundled
- by Bundler.
+ by Bundler. We've also documented how our Bundler support works and
+ how to override our support if you need special behavior.
+ Please refer to the Phusion Passenger Users Guide, section
+ "Bundler support".
* Worked around some user account handling bugs in Ruby.
* Fixed some Ruby 1.9 tempfile.rb compatibility problems.
* Fixed some compilation problems on some ARM Linux platforms.
@@ -76,6 +76,34 @@ end
+=== Bundler support ===
+Phusion Passenger has automatic support for link:[Bundler].
+It works as follows:
+- If you have a '.bundle/environment.rb' in your application root, then Phusion
+ Passenger will require that file before loading your application.
+- Otherwise, if you have a 'Gemfile', then Phusion Passenger will automatically call
+ `Bundler.setup()` before loading your application.
+It's possible that your application also calls `Bundler.setup` during loading, e.g. in
+'' or in 'config/boot.rb'. This is the case with Rails 3, and is also the case if you
+modified your 'config/boot.rb' according to the
+link:[Bundler Rails 2.3 instructions].
+This leads to `Bundler.setup` being called twice, once before the application startup file
+is required and once during application startup. However this is harmless and doesn't
+have any negative effects.
+Phusion Passenger assumes that you're using Bundler >= 0.9.5. If you don't want Phusion
+Passenger to run its Bundler support code, e.g. because you need to use an older version
+of Bundler with an incompatible API or because you use a system other than Bundler, then
+you can override Phusion Passenger's Bundler support code by creating a file
+'config/setup_load_paths.rb'. If this file exists then it will be required before loading
+the application startup file. In this file you can do whatever you need to setup Bundler
+or a similar system.
=== Moving Phusion Passenger to a different directory ===

0 comments on commit 3fc6071

Please sign in to comment.