Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试解决Windows 上ffi Gem中的错误。我需要运行一些从互联网bundle install上提取的项目。问题是尝试安装ffi的 1.9.9 版本,这会出错。bundle install
bundle install
有什么方法可以告诉我bundle install安装ffi的 1.9.8 版吗?Gemfile也许是命令行参数,或者是or的补充Gemfile.lock?
Gemfile
Gemfile.lock
一种可能的复杂情况是,我正在处理的 Gemfile根本没有列出ffi,因此它必须由依赖项的依赖项之一拉入。
在 Gemfile 中明确列出ffi您想要的版本。这就是它的用途:
ffi
gem 'ffi', '1.9.8'
如果您Gemfile.lock已经ffi锁定到 1.9.9 版本(您可能就是这种情况),您可能必须bundle update ffi在将其添加到 Gemfile 之后运行才能bundle install正常工作。
bundle update ffi