0
votes

I get stuck when I'm trying to run the vagrant up command. I have this local .box file sitting in my local drive and fist ran vagrant init, and then added it. Adding seemed to go fine, but when I tried running vagrant up as shown below, it returns:

C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:176:in `split': bad URI(is not URI?): file:C:/Users/burea1124/Projects/theirgoods/CUserurea1124Projectstheirgoodstheirgoods_dev_vm.box (URI::InvalidURIError)

Obviously it looks like I'm supposed to fix the URI somewhere but I have no idea why it looks like that in the first place. Does anybody have any clues to how I can fix this?

C:\Users\burea1124\Projects\theirgoods>vagrant box add theirgoods C:\Users\burea1124\Projects\theirgoods\theirgoods_dev_vm.box ==> box: Adding box 'theirgoods' (v0) for provider: box: Downloading: file://C:/Users/burea1124/Projects/theirgoods/theirgoods_dev_vm.box box: Progress: 100% (Rate: 500M/s, Estimated time remaining: --:--:--) ==> box: Successfully added box 'theirgoods' (v0) for 'virtualbox'!

C:\Users\burea1124\Projects\theirgoods> vagrant up
Bringing machine'default' up with 'virtualbox' provider... ==> default: Box 'CUserurea1124Projectstheirgoodstheirgoods_dev_vm.box' could not be found. Attempting to find and install... default: Box Provider: virtualbox default: Box Version: >= 0 C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:176:in split': bad URI(is not URI?): file:C:/Users/burea1124/Projects/theirgoods/CUserurea1124Projectstheirgoodstheirgoods_dev_vm.box (URI::InvalidURIError) from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:211:in parse' from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/uri/common.rb:747:in parse' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/box_add.rb:458:in metadata_url?' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/box_add.rb:77:in block in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/box_add.rb:75:in map' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/box_add.rb:75:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in block in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in busy' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:79:in handle_box' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:42:in block in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:36:in synchronize' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:36:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in block in finalize_action' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in block in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in busy' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:53:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in block in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in busy' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in run' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:in action_raw' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in block in action' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:in lock' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in call' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in action' from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in block (2 levels) in run'

2

2 Answers

2
votes

It seems that in your Vagrantfile you're referencing the box with the full path, you have to use the box name instead:

config.vm.box = "theirgoods"
2
votes

This was the top question when I searched for that error. The problem in my case was that I added the box correctly, but I copied over an existing Vagrantfile and forgot to do vagrant init.

So for anyone else with this error, make sure you are doing vagrant init :)