如何打包要在不同Linux主机上使用的本地gem

时间:2017-03-24 18:13:01

标签: ruby-on-rails ruby rubygems rvm

我在执行bundle package时收到此消息:

Ignoring PriorityQueue-0.1.2 because its extensions are not built.  Try: gem pristine PriorityQueue --version 0.1.2
Ignoring bcrypt-3.1.11 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.11
Ignoring binding_of_caller-0.7.2 because its extensions are not built.  Try: gem pristine binding_of_caller --version 0.7.2
Ignoring byebug-9.0.6 because its extensions are not built.  Try: gem pristine byebug --version 9.0.6
Ignoring debug_inspector-0.0.2 because its extensions are not built.  Try: gem pristine debug_inspector --version 0.0.2
Ignoring ffi-1.9.18 because its extensions are not built.  Try: gem pristine ffi --version 1.9.18
Ignoring ibm_db-3.0.1 because its extensions are not built.  Try: gem pristine ibm_db --version 3.0.1
Ignoring json-1.8.6 because its extensions are not built.  Try: gem pristine json --version 1.8.6
Ignoring kgio-2.11.0 because its extensions are not built.  Try: gem pristine kgio --version 2.11.0
Ignoring nokogiri-1.7.0.1 because its extensions are not built.  Try: gem pristine nokogiri --version 1.7.0.1
Ignoring raindrops-0.17.0 because its extensions are not built.  Try: gem pristine raindrops --version 0.17.0
Ignoring therubyracer-0.12.3 because its extensions are not built.  Try: gem pristine therubyracer --version 0.12.3
Ignoring unf_ext-0.0.7.2 because its extensions are not built.  Try: gem pristine unf_ext --version 0.0.7.2
Ignoring unicorn-5.2.0 because its extensions are not built.  Try: gem pristine unicorn --version 5.2.0

我正在尝试打包我的应用程序中使用的宝石,以便我可以在另一个系统上使用它而无需再次下载宝石,但我在该系统上遇到上述错误。

1 个答案:

答案 0 :(得分:2)

听起来你可能已经为不同的安装版本的ruby安装了宝石。某些gem链接到需要构建的系统库(读取:在C代码中),它们只是实际C代码库的包装器,例如bcrypt或nokogiri。

在另一篇文章中查看this other answer,它可能是同一个问题,基本上正在运行:

gem pristine --all

应该解决问题