Skip to content

Instantly share code, notes, and snippets.

@sohara
Last active December 11, 2015 05:09
Show Gist options
  • Save sohara/4550433 to your computer and use it in GitHub Desktop.
Save sohara/4550433 to your computer and use it in GitHub Desktop.

#Setting up littlebits community dev environment using vagrant

  1. Download the virtual box and install (OS X).
  2. Download and vagrant and install.
  3. Download the littlebits community box from my dropbox.
  4. If you haven't yet cloned the repo, do so now. Otherwise cd into the repo and run 'git pull' to make sure master is in sync with origin.
  5. Once the download of the littlebits box is complete, add it to your local collection of boxes with vagrant box add littlebits /path/to/downloads/littlebits.box
  6. Make sure you are in the cloned project dir for the littlebits community patform. Then run vagrant init littlebits.
  7. After that is complete you are ready to start vagrant: vagrant up. The vm is now running.
  8. Now you can ssh into the vm. Just run vagrant ssh.
  9. Now you are in the vm. The shared directory between your host and the vm is the project dir for littlebits. In the vm the local path for the shared directory is simply /vagrant. cd into it by running cd /vagrant.
  10. Now you can start the rails server. Run rails s. This starts the rails server process on port 3000. But it is forwarded to port 4567 on your local machine (to avoid conflicts). So check out localhost:4567 in your browser. You'll see that the site is already running with some prepopulated data.

#Setting up the littlebits store (spree) dev env

  1. Follow steps 1 and 2 above only if you haven't already.
  2. Download the littlebits store vm box from my dropbox.
  3. Follow steps 4 to 10 above.

##Other commands

All commands should be run from within the project directory.

  • As mentioned, vagrant up starts the vm.
  • To shutown the vm issue vagrant halt.
  • You might prefer to suspend the vm, thereby leaving processes (such as rails) running, so you don't have to start them again: vagrant suspend.
  • If you have previously suspended the vm you can resume by simply issueing: vagrant resume.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment