vagrant plugin install error `gem install little-p

2019-06-02 18:07发布

问题:

vagrant plugin install vagrant-parallels

Installing the 'vagrant-parallels' plugin. This can take a few minutes... Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is:

An error occurred while installing little-plugger (1.1.4), and Bundler cannot continue. Make sure that gem install little-plugger -v '1.1.4' succeeds before bundling.

Warning: this Gemfile contains multiple primary sources. Using source more than once without a block is a security risk,

and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config disable_multisource true.Warning: this Gemfile contains multiple primary sources. Using source more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run bundle config disable_multisource true.Gem::RemoteFetcher::FetchError: Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/gems/little-plugger-1.1.4.gem)

when I change the --plugin-source

 vagrant plugin install vagrant-parallels --plugin-source https://ruby.taobao.org/

The error is the same. Then I try

gem install little-plugger -v '1.1.4'

Successfully installed little-plugger-1.1.4

Parsing documentation for little-plugger-1.1.4

Done installing documentation for little-plugger after 0 seconds

1 gem installed Then

vagrant plugin install vagrant-parallels --plugin-source https://ruby.taobao.org/

It still don't work

I try to change all the gemfile source

source "https://ruby.taobao.org

But It still don't work. I use gem sources -l

$ gem sources -l   

get follow:
https://ruby.taobao.org/

I don't know how to fix it.

回答1:

I have a stupid way first gem install little-plugger -v '1.1.4' in /Library/Ruby/Gems/2.0.0 and then copy

sudo cp -r gems/little-plugger-1.1.4/ /opt/vagrant/embedded/gems/gems/
sudo cp -r specifications/little-plugger-1.1.4.gemspec /opt/vagrant/embedded/gems/specifications
sudo cp -r doc/little-plugger-1.1.4 /opt/vagrant/embedded/gems/doc
sudo cp cache/little-plugger-1.1.4.gem /opt/vagrant/embedded/gems/cache

It worked. But what other convenient way can set the gem install path



标签: ruby vagrant