Stubbs / sublime-vagrant

Vagrant commands for Sublime Text
43 stars 4 forks source link

Provider 'virtualbox' not found, possible issue with additional_args not working? #26

Open dswebsites opened 8 years ago

dswebsites commented 8 years ago

Hi

Just installed this on my OSX ST3 install as I've started using Vagrant and it seemed like an obvious thing to do..

I'm having issues however getting it to work, whenever I 'up' a box, the plugin fails to find the 'virtualbox' provider showing the following message before downloading then trying to (and failing) install the virtualbox provider.

==>  Provider 'virtualbox' not found. We'll automatically install it now...
The installation process will start below. Human interaction may be
     required at some points. If you're uncomfortable with automatically
     installing this provider, you can safely Ctrl-C this process and install
     it manually.

I know this is installed as if i do an 'up' in the same directory as this project, it completes fine; using the 'virtualbox' provider as follows:

My-MBP:Project1 username$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'minimal/trusty64'...

I've located my vagrant binary with: 'which vagrant' which points me to '/usr/local/bin/vagrant' which is then referenced in my plugin user config as follows: "vagrant_path": "/usr/local/bin/vagrant",

I've tried adding custom parameters/arguments to force the provider as shown on vagrants site (https://www.vagrantup.com/docs/providers/basic_usage.html) with the following '--provider=virtualbox' however I cannot get the 'additional_args' config setting to work...

I've tried: "additional_args": [--provider=virtualbox] Which follows your example given but that errors out in Sublime with:

"additional_args": ["--provider=virtualbox"] "additional_args": "--provider=virtualbox" Which gets through Sublimes/plugin parser, however outputs into ST's console:

"additional_args": {'--provider=virtualbox'} "additional_args": {"--provider=virtualbox"} Which gives the following ST error:

Interestingly, replacing --provider=virtualbox with -h or -v also fails on the same error which makes me think that there may be an underlying issue with the additional_args config parameter.

I'm not sure where to go else now... as Vagrant is running fine on my system running the same commands in the same place with the same Vagrantfile...

Any help would be greatly appreciated, I wish I could offer my assistance, but I've never touched Ruby before, so would be learning to try and fix. =(

dswebsites commented 8 years ago

Small update, I've also tried adding: ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' to the top of my Vagrantfile, and ENV['VAGRANT_DEFAULT_PROVIDER'] = 'VirtualBox' just in case there was an issue with cases, (I've seen it referenced in both forms around the internet.

Interestingly (or expectedly) using VirtualBox stated the same error, but did not continue (as it couldnt find a VirtualBox provider to download and install.