Closed justindossey closed 13 years ago
I think the "correct" way to work around this is by changing ENV before you exec.
Indeed, adding ENV['BUNDLE_GEMFILE']=path_to_app2_gemfile makes the trouble go away, with the only ugliness that the caller must know the location to the file.
You can probably just delete BUNDLE_GEMFILE from ENV.
On May 12, 2011, at 4:05 PM, justindossey reply@reply.github.com wrote:
Indeed, adding ENV['BUNDLE_GEMFILE']=path_to_app2_gemfile makes the trouble go away, with the only ugliness that the caller must know the location to the file.
Reply to this email directly or view it on GitHub: https://github.com/carlhuda/bundler/issues/1166#comment_1149907
This is related to issue #739 with Unicorn, but I found it with a simple non-framework (no Rails, Sinatra, etc) application.
If you have two applications, call them "app1" and "app2", and they both have (different) Gemfiles, and you want to fork a process from app1 to run app2, you might do something like
However, app2 won't launch successfully if the Gemfile for app2 is not identical to that for app1. You can work around this by calling system() instead of exec(), but that is not a very good solution.