Rails Bundler - 在Gemfile中使用-opt-dir指定?

Jef*_*eff 2 ruby-on-rails gemfile puma

我可以在下载openssl并执行以下命令后安装puma:

gem install -- --with-opt-dir=c:\openssl
Run Code Online (Sandbox Code Playgroud)

问题是,如果我尝试用bundle更新puma,它对此目录一无所知.

你能-- --with-opt-dir=在Rails Gemfile中指定吗?

小智 6

您可以在bundle config中指定它,如下所示:bundle config build.puma --with-opt-dir=your/opt/dirbundler会将它传递给gem install.