Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vagrant dev environment autoprovisioning in Windows #353

Closed
realchrisolin opened this issue Aug 19, 2017 · 4 comments · Fixed by #372
Closed

Fix vagrant dev environment autoprovisioning in Windows #353

realchrisolin opened this issue Aug 19, 2017 · 4 comments · Fixed by #372

Comments

@realchrisolin
Copy link
Contributor

(work) [pty1] ~/bike_index (branch:master) » vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'v0rtex/xenial64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'v0rtex/xenial64' is up to date...
==> default: Setting the name of the VM: bike_index_default_1503112204589_40863
==> default: Installing Chef cookbooks with Librarian-Chef...
==> default: Auto-generating node name for Chef...
==> default: Destroying VM and associated drives...
C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:309:in `unpack_package!': The package archive has too many children! (RuntimeError)
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:224:in `cache_version_uri_unpacked!'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:93:in `block in version_uri_manifest'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:382:in `memo'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:92:in `version_uri_manifest'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:88:in `version_manifest'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:54:in `version_dependencies'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-chef-nochef-0.2.0/lib/librarian/chef/source/site.rb:463:in `fetch_dependencies'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-0.1.2/lib/librarian/manifest.rb:125:in `fetch_dependencies!'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-0.1.2/lib/librarian/manifest.rb:117:in `fetched_dependencies'
        from C:/Users/Chris Olin/.vagrant.d/gems/2.3.4/gems/librarian-0.1.2/lib/librarian/manifest.rb:81:in `dependencies'

Might have to look at using a simple shell script to do this, which has the added benefit of breaking less often (hopefully).

@realchrisolin
Copy link
Contributor Author

realchrisolin commented Aug 19, 2017

Might be able to tweak https://github.com/brunofacca/rails-development-environment to do this, but it'll have to be another day. Figures the first time I get in weeks to work on these PRs, something else breaks ¯\_(ツ)_/¯

@realchrisolin realchrisolin changed the title Fix vagrant dev environment autoprovisioning Windows Fix vagrant dev environment autoprovisioning in Windows Aug 20, 2017
@realchrisolin
Copy link
Contributor Author

@realchrisolin
Copy link
Contributor Author

Quick update, I've nearly got this working again but getting ruby 2.2.5/rvm set up during provisioning has become a real pain in the ass largely due to https://stackoverflow.com/questions/22650731/rvm-warning-path-is-not-properly-set-up. I think I've finally got it working by implementing a couple sledgehammer type workarounds and am waiting for a fresh environment to finish provisioning to confirm. If I don't put in a PR tonight, expect one soon.

@realchrisolin
Copy link
Contributor Author

realchrisolin commented Jan 31, 2018

Throwing these commands in here for future reference. They're the commands I couldn't get working during provisioning without running into various shell/ruby/permissions errors.

  cd /vagrant
  bash --login -c "rvm use 2.2.5"
  bash --login -c "gem install bundler"
  bash --login -c "bundle install"
  bash --login -c "rake db:setup"
  bash --login -c "rake seed_test_users_and_bikes"

In short, there's something weird about the shell Vagrant is using to run the provision commands, but running them manually after vagrant sshing into the dev environment works without issue. Something to try getting working another day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant