新手问题 关于 Bundler 的问题

linjunzhugg · February 09, 2015 · Last by linjunzhugg replied at February 09, 2015 · 1831 hits

本机使用环境:RVM 服务器使用环境:RVM

一直以来都很疑惑:

在本机上, vendor/bundle 是没这个目录的。

而用mina 部署应用过后,vendor/bundle 则有这个目录,里面是各个 Gem 的执行脚本。

为什么呢?

还有,比如项目里加了 sidekiq 这个 GEM。

那我在项目目录里执行 bundle exec sidekiq 这个命令,系统是去哪里寻找这个目录的呢?

喔喔!!看了下mina的源码

# This path will be symlinked to `./shared/bundle` so that the gems cache will
# be shared between all releases.

set_default :bundle_path, './vendor/bundle'
1 Floor has deleted

当执行 bundle install --path 'vendor/bundle' 时,gem 则会安装到项目内。

而当执行 bundle exec sidekiq 时,默认是去 rvm 目录下的 bin 目录找执行脚本。

You need to Sign in before reply, if you don't have an account, please Sign up first.