Giter Site home page Giter Site logo

sugar-dev-box's Introduction

sugar-dev-box

Requirements

Setup

First, build the virtual machine. This might take a few minutes:

host $ git clone https://github.com/elektronaut/sugar-dev-box.git
host $ cd sugar-dev-box
host $ vagrant up

Clone your Sugar fork into the same directory:

host $ git clone [email protected]:<username>/sugar.git

Vagrant mounts this directory as /vagrant within the virtual machine. Log in with:

host $ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)
...
vagrant@sugar-dev-box:~$

On the VM, run Bundler to install the rest of the dependencies, create the configuration and populate the database with:

vm $ cd /vagrant/sugar
vm $ bundle
vm $ bin/rake db:create
vm $ bin/rake db:migrate

To run the tests, you also need to create the test database:

vm $ bin/rake db:create RAILS_ENV=test
vm $ bin/rake db:migrate RAILS_ENV=test

Starting the development server

host $ vagrant ssh
vm $ cd /vagrant/sugar
vm $ bin/sunspot-solr start
vm $ bin/rails server -b 0.0.0.0

The development server is now accessible on localhost:3000.

Running the tests

host $ vagrant ssh
vm $ cd /vagrant/sugar
vm $ bin/rspec

Recommended Workflow

The recommended workflow is

  • edit in the host computer and

  • run and test within the virtual machine.

This workflow is convenient because in the host computer you normally have your editor of choice fine-tuned, Git configured, and SSH keys in place.

Virtual Machine Management

When done just log out with ^D and suspend the virtual machine

host $ vagrant suspend

then, resume to hack again

host $ vagrant resume

Run

host $ vagrant halt

to shutdown the virtual machine, and

host $ vagrant up

to boot it again.

You can find out the state of a virtual machine anytime by invoking

host $ vagrant status

Finally, to completely wipe the virtual machine from the disk destroying all its contents:

host $ vagrant destroy # DANGER: all is gone

Please check the Vagrant documentation for more information on Vagrant.

Credits

Based on rails-dev-box by Xavier Noria

License

Released under the MIT License. Original work Copyright (c) 2012-ω Xavier Noria Modified work Copyright 2013 Inge Jørgensen

sugar-dev-box's People

Contributors

fxn avatar elektronaut avatar mlafeldt avatar amaia avatar pixeltrix avatar benmoss avatar sadfuzzy avatar dominic avatar fcarrega avatar franc avatar iamjarvo avatar joshgoebel avatar tigerwolf avatar wevah avatar pnc avatar rywall avatar simonjefford avatar

Watchers

James Cloos avatar Sally MacNicholas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.