我如何才能要求我目前正在开发的插件而不将其发布到rubygems?在我可以要求使用Vagrant.require_plugin之前,但是现在它打印出我已弃用的内容。
这是我的宝石文件
source 'https://rubygems.org'
gem 'bundler'
gem "vagrant", github: "mitchellh/vagrant"
group :plugin do
gem 'vagrant-sheogorath', :path => '/Users/sandric/vagrant-sheogorath/'
end
这是我的Vagrantfile:
require "vagrant-sheogorath"
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
当我运行bundle exec vagrant插件列表时,这是输出:
sandric@sandric-mac ~/v/provision> bundle exec vagrant plugin list
Vagrant appears to be running in a Bundler environment. Your
existing Gemfile will be used. Vagrant will not auto-load any plugins.
You must load any plugins you want manually in a Vagrantfile. You can
force Vagrant to take over with VAGRANT_FORCE_BUNDLER.
You appear to be running Vagrant outside of the official installers.
Note that the installers are what ensure that Vagrant has all required
dependencies, and Vagrant assumes that these dependencies exist. By
running outside of the installer environment, Vagrant may not function
properly. To remove this warning, install Vagrant using one of the
official packages from vagrantup.com.
No plugins installed.
当我尝试安装它时:
sandric@sandric-mac ~/v/provision> bundle exec vagrant plugin install vagrant-sheogorath
Vagrant appears to be running in a Bundler environment. Your
existing Gemfile will be used. Vagrant will not auto-load any plugins.
You must load any plugins you want manually in a Vagrantfile. You can
force Vagrant to take over with VAGRANT_FORCE_BUNDLER.
You appear to be running Vagrant outside of the official installers.
Note that the installers are what ensure that Vagrant has all required
dependencies, and Vagrant assumes that these dependencies exist. By
running outside of the installer environment, Vagrant may not function
properly. To remove this warning, install Vagrant using one of the
official packages from vagrantup.com.
Installing the 'vagrant-sheogorath' plugin. This can take a few minutes...
ERROR warden: Error occurred: Vagrant's built-in bundler management mechanism is disabled because
Vagrant is running in an external bundler environment. In these
cases, plugin management does not work with Vagrant. To install
plugins, use your own Gemfile. To load plugins, either put the
plugins in the `plugins` group in your Gemfile or manually require
them in a Vagrantfile.
答案 0 :(得分:1)
在开发过程中,您似乎不需要安装插件。您只需将其包含在:plugin
的{{1}}组中,Vagrant就应该在运行时为您加载它。
顺便说一下,在存储库主分支上已经存在updated version of the plugin development doc page。