rails-5-jade icon indicating copy to clipboard operation
rails-5-jade copied to clipboard

rails-jade-18-04-pg + windows = errors in "file provisioner"

Open renatopanda opened this issue 5 years ago • 10 comments

Hi, The host is win7 with the latest virtualbox and vagrant (also tested on win10). Simply running the commands:

vagrant init jadesystems/rails-jade-18-04-pg
vagrant up

results in:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

File provisioner:
* File source must be specified.
* File upload source file C:/Users/<USER NAME HERE>/.gem/credentials must exist

Can't figure out why but the older box works as expected (rails-5-2).

Thanks!

renatopanda avatar Oct 29 '19 17:10 renatopanda

Thanks for reporting this. Unfortunately, I don't have a Windows machine that I can test on. I know why this happens, but the fix may not be obvious. In the meantime, can you use the box at all? The part that's failing shouldn't affect the majority of the box's functionality. The change was to make it easier to push gems and work with git from inside the box, but the fix appears only to work for Linux and perhaps MacOS hosts.

lcreid avatar Nov 06 '19 03:11 lcreid

I can't because it fails on vagrant up saying that I need to fix the errors and then try again. If you have any suggestion let me now and I will happily try it. Cheers.

renatopanda avatar Nov 12 '19 22:11 renatopanda

I don't have access to a Windows machine. I would appreciate it if someone can try one of the V6.1.1 boxes from https://app.vagrantup.com/jadesystems, and let me know if it works, or at least doesn't cause a blocking failure.

lcreid avatar Nov 25 '19 14:11 lcreid

Using the same image jadesystems/rails-jade-18-04-pg (virtualbox, 6.1.1), now I get the following (2x the first error):

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

File provisioner:
* File source must be specified.
* File source must be specified.

renatopanda avatar Dec 04 '19 22:12 renatopanda

I'm having the same issue on macOS catalina 10.15.1 VirtualBox 6.0.14 and Vagrant 2.2.6. I've tried the jadesystems/rails-jade-16-04-pg (v6.1.1), jadesystems/rails-jade-18-04-pg (v6.1.1) and jadesystems/rails-jade-18-04-mssql (v6.1.1) boxes and they all return the same error

File provisioner:
* File source must be specified.
* File source must be specified.

jpcanoso avatar Dec 05 '19 16:12 jpcanoso

Thanks for the updates, and sorry for the slow response. I'll have to back out those changes (as nice as they are for those of us on Linux), and re-think how to do this.

lcreid avatar Dec 12 '19 05:12 lcreid

In case this helps others, starting from the previous box (5-2) you can use rails 6 by running:

// update rails to latest (6.x), for some reason had to use sudo
sudo gem install rails

//update node since a newer version is needed
sudo apt-get update nodejs -y

Trying rails new . will fail on windows hosts because webpack (included with rails 6) creates symlinks on the shared folder but windows/vagrant will not allow that by default.

In those cases, the solution is enabling symlinks in vagrant by adding to the Vagrantfile:

config.vm.provider "virtualbox" do |v|
      v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end

For this to work vagrant up needs to run with administrator privileges so open a terminal (e.g., git bash) with admin privileges (right click, "run as admin").

renatopanda avatar Dec 14 '19 15:12 renatopanda

Thanks for the updates. The next release will include a newer Node version (#41). I've noted your question about needing sudo for updating Rails (#42). I may a get a chance to work on (#37) soon. We'll try your suggestions for running Vagrant as admin.

I'm currently testing boxes that shouldn't error when provisioning a new box, to fix the current issue (#38).

lcreid avatar Dec 14 '19 16:12 lcreid

I uploaded to https://app.vagrantup.com/jadesystems version 6.2.0 of all four boxes. I hope it soles the error in file provisioner problem. Let me know if it works.

lcreid avatar Dec 14 '19 22:12 lcreid

still get this on macOS catalina

nemesit avatar Feb 20 '20 10:02 nemesit