GithubHelp home page GithubHelp logo

chef-rails-dev-box's Introduction

chef-rails-dev-box

Introduction

This project automates the setup of a development environment for Ruby on Rails core development. This is port of rails-dev-box using by Chef.

Requirements

How To Build The Virtual Machine

Building the virtual machine is this easy:

host $ git clone [email protected]:banyan/chef-rails-dev-box.git
host $ cd chef-rails-dev-box
host $ bundle install
host $ cd chef
host $ bundle exec librarian-chef install
host $ cd ../
host $ vagrant up

That's it.

If the base box is not present that command fetches it first. The setup itself takes about 15 minutes in my MacBook Air. After the installation has finished, you can access the virtual machine with

$ vagrant ssh
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic x86_64)
...
vagrant@chef-rails-dev-box:~$

Caveats

For Windows User

When vagrant bootup, shared folder is mounted by using NFS. NFS is not supported on Windows hosts. (See document)

Comment this line if you are Windows user.

-  config.vm.share_folder("v-root", "/vagrant", ".", "nfs" => true)
+  # config.vm.share_folder("v-root", "/vagrant", ".", "nfs" => true)

What's In The Box

  • Git
  • Ruby 2.0.0-p0 via rbenv
  • Bundler
  • SQLite3, MySQL, and Postgres
  • System dependencies for nokogiri, sqlite3, mysql, mysql2, and pg
  • Databases and users needed to run the Active Record test suite
  • Node.js for the asset pipeline
  • Memcached

Recommended Workflow

The recommended workflow is

  • edit in the host computer and
  • test within the virtual machine.

Just clone your Rails fork in the very directory of the Rails development box in the host computer:

host $ ls
README.md   Vagrantfile puppet
host $ git clone [email protected]:rails/rails.git

Vagrant mounts that very directory as /vagrant within the virtual machine:

vagrant@chef-rails-dev-box:~$ ls
/vagrant/chef  rails  README.md  Vagrantfile

so we are ready to go to edit in the host, and test in the virtual machine.

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

Virtual Machine Management

host $ vagrant suspend # just log out
host $ vagrant resume  # resume to hack again
host $ vagrant halt    # to shutdown
host $ vagrant up      # to boot it again
host $ vagrant status  # check status
host $ vagrant destroy # DANGER: all is gone

Please check the Vagrant documentation for more information on Vagrant.

chef-rails-dev-box's People

Contributors

banyan avatar kentaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chef-rails-dev-box's Issues

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.