Skip to content

Installation with Vagrant

mtc2013 edited this page Jul 22, 2014 · 7 revisions
  1. install VirtualBox from https://www.virtualbox.org/wiki/Downloads
  2. install Vagrant from http://www.vagrantup.com/
  3. fork on github: https://github.com/AgileVentures/LocalSupport
  4. install Git on your machine
  5. on Windows add "C:\Program Files (x86)\Git\bin" (or the correct path on your machine) to your Path environment variable
  6. ON YOUR HOST: clone your fork of LocalSupport
  7. cd to the cloned directory
  8. edit that Vagrantfile if you want the vm to use other than 1024 Mb memory and 1 cpu
  9. vagrant box add hashicorp/precise32 => new-style image if you have new Vagrant.
  10. on older versions of Vagrant: vagrant box add precise32 and remove 'hashicorp/' from Vagrantfile.
  11. vagrant up => launches and provisions vm if first run, will take > 10 mins
  12. vagrant ssh => command line access
  13. cd /LocalSupport on Mac OS X and Linux. If on Windows, the LocalSupport app directory might live above the home folder, ie cd ../../LocalSupport might be required.
  14. bundle exec rake spec => run unit tests
  15. xvfb-run bundle exec rake cucumber => run feature tests (takes > 2 min)
  16. rails s
  17. open http://localhost:3003/ on host to see running app
  18. other vagrant commands are vagrant halt => stopping, and vagrant destroy => permanently delete VM

Note: Possible error with the Vagrant install on Windows 8: Errno::ETXTBSY in OrganizationsController#index Text file busy ... etc.

This SO post suggests setting the version of the sass gem in the Gemfile to 3.2.10 and that made it work: http://stackoverflow.com/questions/19124367/rails-app-on-percise32-vagrant-box-assets-get-text-file-busy-error-errnoe