【发布时间】:2021-07-20 22:00:43
【问题描述】:
我正在尝试在 FreeBSD 上进行捆绑,但它找不到 grpc gem。我使用 FreeBSD 软件包安装了 grpc 1.30.2 版本,但找不到系统 gem。
我希望有一个 bundle config 设置来查找和使用已经构建和安装的系统 gem。
我得到的错误是:
An error occurred while installing grpc (1.30.2), and Bundler cannot continue.
Make sure that `gem install grpc -v '1.30.2' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
grpc
* bundle install
Warning: the running version of Bundler (2.0.2) is older than the version that created the lockfile (2.2.11). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
/usr/local/lib/ruby/site_ruby/2.7/rubygems/package.rb:509: warning: Using the last argument as keyword parameters is deprecated
/usr/local/lib/ruby/site_ruby/2.7/rubygems/package.rb:509: warning: Using the last argument as keyword parameters is deprecated
/usr/local/lib/ruby/site_ruby/2.7/rubygems/package.rb:509: warning: Using the last argument as keyword parameters is deprecated
/usr/local/lib/ruby/site_ruby/2.7/rubygems/package.rb:509: warning: Using the last argument as keyword parameters is deprecated
Some gems seem to be missing from your vendor/cache directory.
Could not find grpc-1.30.2 in any of the sources
* Visruleparser
A extras/visruleparser.pl
Export complete.
* precompile assets
Could not find grpc-1.30.2 in any of the sources
Run `bundle install` to install missing gems.
我的 Gemfile 有这些行
source 'https://rubygems.org'
gem 'grpc', '1.30.2'
gem 'grpc-tools', '1.30.2'
Gemfile.lock 有这些
grpc (= 1.30.2)
grpc-tools (= 1.30.2)
这些 FreeBSD 软件包已安装
>pkg info -x grpc
grpc-1.22.0_4,2
rubygem-grpc-1.30.2
>gem list grpc
*** LOCAL GEMS ***
grpc (1.30.2)
在 FreeBSD 上列出远程 gem 不会显示任何内容
>gem list --remote -all gprc
*** LOCAL GEMS ***
但在 macOS 上,我得到了这些(以及其他)
>gem list --remote --all grpc
grpc (1.37.0 ruby universal-darwin x64-mingw32 x86-linux x86-mingw32 x86_64-linux,
1.36.0 ruby universal-darwin x64-mingw32 x86-linux x86-mingw32 x86_64-linux,
...
1.30.2 ruby universal-darwin x64-mingw32 x86-linux x86-mingw32 x86_64-linux,
...
gem 安装在目录/usr/local/lib/ruby/gems/2.7/gems/grpc-1.30.2 中,下面有一个src 子目录和一个ruby 子目录。
>ls /usr/local/lib/ruby/gems/2.7/gems/grpc-1.30.2/src/ruby
bin ext lib pb spec
环境
FreeBSD 11.4
Ruby 2.7.2p137
RubyGems 3.0.8
Bundler 2.1.4
【问题讨论】:
-
您在显示调试信息方面做得很好,但我看不出问题出在哪里。您能否显示未按预期工作的命令及其输出?
-
谢谢。添加了错误消息。