`vagrant up` not from command line?


(Gaurang Tandon) #1

So, I have to download, as per official discourse development guide, vagrant software and then, run vagrant up in the git shell opened from the github desktop client for dicourse’s master branch. My question is I get something like this:

The problem is that my internet connection is not very good and it automatically reboots every 2 hours or so. It’s speed is also not very fast. So, trying to download vagrant through cmd is hopeless. I have already failed a dozen times. That’s why I use Free Download Manager for big downloads like this one.

My question is: How can I download that .box file and complete all tasks that vagrant up does without using cmd?

I looked at SOLVED: “The connection was reset” with Discourse Vagrant but it was about some bundle exec rails s command (and it’s closed so I can’t respond there) and I looked at discourse/VAGRANT.md at master · discourse/discourse · GitHub but it too provided no help.

I can download the discourse-vms.s3.amazonaws.com/discourse-1.3.0.box using FDM but I don’t know which folder to put it inside and what else to do (which vagrant up does), for which I need guidance.

SUMMARY SOLUTION:

For Windows users, this is the best path:

  1. `vagrant up` not from command line?
  2. `vagrant up` not from command line?
  3. `vagrant up` not from command line?
  4. After this, you have to run vagrant up.

(Régis Hanol) #2
  1. Download http://discourse-vms.s3.amazonaws.com/discourse-1.3.0.box
  2. Run vagrant box add discourse-1.3.0 /path/to/the/downloaded/discourse-1.3.0.box

(Gaurang Tandon) #3

EDIT: This error got solved down below

Thanks! The file got downloaded completely, but I got this error. I don’t know why. Please help :slight_smile:


(Régis Hanol) #4

You should use “\” instead of “/” as separator on Windows :wink:

It should be

vagrant box add discourse-1.3.0 C:\Users\intl\Desktop\discourse-1.3.0.box

(Gaurang Tandon) #5

I am sorry but I don’t really understand cmd well :confused: and so need some more help, well, because, now, I got this error:

$ vagrant box add discourse-1.3.0 C:\Users\intl\Desktop\discourse-1.3.0.box
I:/Vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:66:in `split': bad URI(is not URI?):file://C:UsersintlDesktopdiscourse-1.3.0.box (URI::InvalidURIError)
        from I:/Vagrant/embedded/lib/ruby/2.2.0/uri/rfc3986_parser.rb:72:in `parse'
        from I:/Vagrant/embedded/lib/ruby/2.2.0/uri/common.rb:226:in `parse'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/box_add.rb:467:in `metadata_url?'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/box_add.rb:77:in `block in call'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/box_add.rb:75:in `map'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builtin/box_add.rb:75:in `call'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/warden.rb:34:in `call'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/builder.rb:116:in `call'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `block in run'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/util/busy.rb:19:in `busy'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/action/runner.rb:66:in `run'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/commands/box/command/add.rb:78:in `execute'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/plugins/commands/box/command/root.rb:61:in `execute'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/cli.rb:42:in `execute'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/environment.rb:302:in `cli'
        from I:/Vagrant/embedded/gems/gems/vagrant-1.8.1/bin/vagrant:174:in `<main>'

(Régis Hanol) #6

Try this

vagrant box add discourse-1.3.0 C:\\Users\\intl\\Desktop\\discourse-1.3.0.box

Or this

vagrant box add discourse-1.3.0 'C:\Users\intl\Desktop\discourse-1.3.0.box'

(Gaurang Tandon) #7

Same error that I got the first time:

I have double checked, the .box file exists at the path I have specified in the cmd above. Seems like I have to re-download the file, isn’t it?


(dtchau) #8

It looks like you are on the “F” drive (?) and is trying to access file on the “C” drive. Windows path is notoriously peculiar. I would suggest you move the file to a location that you can reference using a relative path. Try to use .. to trace to your file and avoid referencing it using C:/


(Gaurang Tandon) #9

Ok, my discourse folder (that I had cloned from the main site) was on F drive. And my .box file was on desktop. I moved the .box file inside F drive, so that discourse folder and .box file were siblings inside F drive. And this time, using relative paths worked:

vagrant box add discourse-1.3.0 '..\discourse-1.3.0.box'

Thank you discourse people for your amazing support! :smiley:


(Gaurang Tandon) #10

Ok, so according to the next step on the official guide, I ran vagrant ssh next but things didn’t go as expected. Here’s what happened:

Any ideas why?


(Aryan Raj) #11

Run

vagrant box add discourse/discourse-1.3.0 '..\discourse-1.3.0.box'

instead of

vagrant box add discourse-1.3.0 '..\discourse-1.3.0.box'


(Gaurang Tandon) #12

Awesome! Thanks @aryanraj! I have summarized the solution in the top topic, for any outside visitor.


(Régis Hanol) #13