vagrant install plugin from github
As of today I see only two workarounds:
- you could
rake build
the plugin, upload the resulting .gem to gemfury, and then use this as the--plugin-source
. - you could install the plugin from a local source, e.g.
vagrant plugin install /path/to/your/bugfixed.gem
In the end, I would love to see something like a Gemfile
for Vagrant plugins. AFAIK there ain't no such thing yet but here is a feature request
EDIT: actually there is an awesome project called bindler now. The feature request to add git location support in bindler is still outstanding, but this is the place where it should be fixed imho
Demand a Vagrant plugin within the Vagrantfile?
2019 Update: Vagrant now has functionality to require plugins through the Vagrantfile
via:
Vagrant.configure("2") do |config|
config.vagrant.plugins = "vagrant-some-plugin"
# or as array:
config.vagrant.plugins = ["vagrant-some-plugin", "vagrant-some-other-plugin"]
# or as hash
config.vagrant.plugins = {"vagrant-some-plugin" => {"version" => "1.0.0"}}
end
If Vagrant detects there are plugins not already installed it will prompt the user to install them itself:
$ vagrant up
Vagrant has detected project local plugins configured for this
project which are not installed.
vagrant-some-plugin
Install local plugins (Y/N) [N]: y
Installing the 'vagrant-some-plugin' plugin. This can take a few minutes...
Fetching vagrant-some-plugin-1.0.0.gem
Installed the plugin 'vagrant-some-plugin (1.0.0)'!
Vagrant has completed installing local plugins for the current Vagrant
project directory. Please run the requested command again.
See https://www.vagrantup.com/docs/vagrantfile/vagrant_settings.html
Installing vagrant-vsphere plugin
You should be able to install it after bulding it from source:
mkdir ~/tmpbuild
cd ~/tmpbuild
git clone git://github.com/nsidc/vagrant-vsphere.git
cd vagrant-vsphere
gem build vSphere.gemspec
vagrant plugin install vagrant-vsphere-0.0.1
vagrant include plugin source in my project
I had a similar need and the method I went with was to add the following at the top of my Vagrantfile
:
unless Vagrant.has_plugin?("vagrant-omnibus") || ARGV[0] == 'plugin'
origargs = ARGV.join(" ");
puts "Plugins not found"
exec "vagrant plugin install vagrant-omnibus;vagrant #{origargs}"
end
It doesn't really answer your questions I guess but it works for me, I found that I also needed to add sudo
in front of the vagrant plugin
command for my ubuntu setup, but as you don't state what OS you are running that might not be relevant.
Unable to install vagrant-hostupdater plugin during Vagrant up with VVV
I have tried it and seen the github page you have shared.
Well, in your case you are making a typo i.e. spelling error:
its not 'vagrant-hostupdater', it's called the 'vagrant-hostsupdater' package, you are missing an 's' in there.
Here is the github page hosting the vagrant-hostsupdater code:
https://github.com/cogitatio/vagrant-hostsupdater
Related Topics
Enumerator as an Infinite Generator in Ruby
Building Hash by Grouping Array of Objects Based on a Property of the Items
Get Jekyll Configuration Inside Plugin
Examples of 'Things' That Are Not Objects in Ruby
Ruby Amazon S3 Access Denied When Listing Buckets
Rails Way to Detect Mobile Device
Error Installing Gem: Couldn't Reserve Space for Cygwin's Heap, Win32 Error 487
Cheat Sheet for All Design Patterns Implemented in Ruby
Read Contents of a Local File into a Variable in Rails
Limiting Characters/Words in View - Ruby on Rails
Ruby - Array.Join Versus String Concatenation (Efficiency)
A Selenium Webdriver Exception
How to Create a Symbol from a String That Has Whitespaces