Cavalerie Web Gem

Codeship Status for lacavalerie/cavalerie_web_gem

Code Climate

Test Coverage

Why this gem?

This gem allow you to setup a local Wordpress development environment on your machine.

Installation

1. Requirements

Ruby 2.0+

$ brew install rbenv ruby-build

# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile

Then jump to "Finishing rbenv install for all systems"

  • For Debian
$ sudo apt-get update && sudo apt-get install git-core
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc

# Restart you shell

# Ensuring rbenv in installed
$ type rbenv

$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash

$ apt-get install build-essential libssl-dev libcurl4-openssl-dev libreadline-dev -y

Then jump to "Finishing rbenv install for all systems":

# Install Ruby (this could take a while...)
$ rbenv install 2.1.0 -k
$ rbenv global 2.1.0

# Ensure the Ruby used is the rbenv's one
which ruby

MySQL Dev (see this Stackoverflow ticket)

  • Linux
# Ubuntu/Debian
$ sudo apt-get install libmysqlclient-dev

# Fedora
$ sudo yum install mysql-devel
  • Mac OSX
$ brew install mysql

2. Gem installation

In your Terminal, run the following commands:

$ gem install cavalerie_web

# Ensure gen is installed and accessible
$ which cavalerie

$ cavalerie init

Then follow instructions to complete installation.

Usage

Right after the installation is completed, you can run:

$ cavalerie up

This will power up a virtual machine inside VirtualBox, with:

  • Apache2 web server
  • MySQL server
  • phpMyAdmin

At any time, to know the current status, you can run:

$ cavalerie status

To get help, feel free to run the command cavalerie without argument.