Rails 3: Passenger can't find git gems installed by bundler

前端 未结 6 2022
伪装坚强ぢ
伪装坚强ぢ 2020-12-07 09:41

Rails 3.0.0, Passenger 2.2.15:

  • Create a new Rails project
  • Add gem \'paperclip\', :git => \'git://github.com/lmumar/paperclip.git\', :branch =
6条回答
  •  鱼传尺愫
    2020-12-07 10:10

    Solution (took me a few hours):

    Mare sure that RAILS_ROOT/.bundle/config (SetEnv etc. didn't work for me) contains:

    --- 
    BUNDLE_PATH: /home/xxxxx/.bundler
    

    Note BUNDLE_PATH, not BUNDLER_PATH! There was also an DISABLED_SHARED_GEMS=1 entry, I removed it.

    Then bundler recognises the correct path even when loaded from Passenger. Without Passenger, it always worked (and used /home/xxxxx/.bundler, as said in the question)

提交回复
热议问题