Qt 库在 OSX 12 (Sierra) 上损坏,这是 gem capybara-webkit
的依赖项之一。所以目前如果 capybara-webkit
在 Gemfile 中,对于大多数人来说 bundle install
将会失败。
有a workaround for this ,其中涉及手动安装Qt,然后使用本地版本安装gem ...
$ PATH=~/Qt5.5.1/5.5/clang_64/bin:$PATH gem install capybara-webkit
我想将 bundler 配置为始终使用 Qt 的这个本地副本,这样我就不必记住在每个 gemset 中都这样做。这可能吗?我看过 Bundler config文档,但不太明白我在找什么。
理想情况下,我希望找到一种解决方案,该解决方案使用我可以传递给我的团队的可移植配置文件,而不是他们都必须运行的一系列命令。
感谢您的任何建议!
最佳答案
尝试添加 local git repo用于 bundler 。
Bundler also allows you to work against a git repository locally instead of using the remote version. This can be achieved by setting up a local override:
bundle config local.GEM_NAME /path/to/local/git/repository
For example, in order to use a local Rack repository, a developer could call:
bundle config local.rack ~/Work/git/rack
Now instead of checking out the remote git repository, the local override will be used. Similar to a path source, every time the local git repository change, changes will be automatically picked up by Bundler. This means a commit in the local git repo will update the revision in the Gemfile.lock to the local git repo revision. This requires the same attention as git submodules. Before pushing to the remote, you need to ensure the local override was pushed, otherwise you may point to a commit that only exists in your local machine.
如果您当前的 Qt 本地副本不在 git 存储库中,您可以简单地克隆主存储库并将您的更改推送到本地计算机上。
关于ruby-on-rails - 如何配置 Bundler 以使用本地 gem 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41947754/