`vagrant up` not from command line?

AI 生成的摘要

The original poster, GaurangTandon, had trouble downloading the .box file required for a Discourse installation using the vagrant up command due to a poor internet connection. They asked how to download the file and complete the tasks without using the command line.

zogstrip suggested downloading the file manually and then running vagrant box add discourse-1.3.0 /path/to/the/downloaded/discourse-1.3.0.box. However, GaurangTandon encountered errors due to incorrect path separators on Windows.

After some troubleshooting, dtchau suggested using relative paths, which worked for GaurangTandon. The correct command was vagrant box add discourse-1.3.0 '..\discourse-1.3.0.box'.

Later, GaurangTandon encountered issues with the vagrant ssh command, but aryanraj provided the solution: running vagrant box add discourse/discourse-1.3.0 '..\discourse-1.3.0.box' instead.

GaurangTandon has summarized the solution in the top post for future reference.

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 https://meta.discourse.org/t/solved-the-connection-was-reset-with-discourse-vagrant/34284 but it was about some bundle exec rails s command (and it’s closed so I can’t respond there) and I looked at https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md#using-vagrant 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 by zogstrip
  2. `vagrant up` not from command line? - #8 by dtchau
  3. `vagrant up` not from command line? - #11 by aryanraj
  4. After this, you have to run vagrant up.
  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

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:

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

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>'

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'

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?

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:/

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:

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?

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'

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