Rails 3: Passenger can't find git gems || gem is not checkout Please run bundle install

ails 3.0.0, Passenger 2.2.15:
  • Create a new Rails project
  • Add gem 'paperclip', :git => 'git://github.com/lmumar/paperclip.git', :branch => 'rails3'to your Gemfile
  • Do bundle install
  • Everything OK, starting with rails/script server & accessing also works
  • However, when accessing with Passenger, it says:

git://github.com/lmumar/paperclip.git (at rails3) is not checked out. Please run bundle install (Bundler::GitError)

I have tried bundler pack (doesn't help) and setting BUNDER_HOME to ~/.bundler (the Paperclip git gets installed there by bundler install) in the .htaccess and various places in config/*.rb, but this wasn't successful, too.

~/.bundler is owned by the same user as the Rails project (Passenger runs under this user), so it can't be a permission problem. sudo is installed and called by bundle install.

--------------------------------------------

Im used to have this problem, resolve using

bundle --deployment

Which will install the gems in vendor/bundle

or bundle install --path vendor/bundle to install the gems locally, instead of into system gems.

  

or

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)



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值