有没有办法从它的 Github repo(或者,更具体地说,一个 fork)而不是从 Rubygems 安装 Ruby gem?
我试过了
gem_package 'some_gem' do
source 'git://github.com:user/some_gem.git'
end
我得到
Gem::Exception
--------------
Cannot load gem at [git://github.com:user/some_gem.git] in /
Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/some_recipe/recipes/default.rb
15: gem_package 'some_gem' do
16: source 'git://github.com:user/some_gem.git'
17: end
18:
Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/some_gem/recipes/default.rb:15:in `from_file'
gem_package("some_gem") do
provider Chef::Provider::Package::Rubygems
action :install
retries 0
retry_delay 2
package_name "some_gem"
source "git://github.com:user/some_gem.git"
cookbook_name :some_cookbook
recipe_name "default"
end
https://github.com/user/some_gem
我也对错误的源进行了同样的尝试Illformed requirement [""]
。