#Mac OS X
This tutorial guides you through creating your first Vagrant project.
We start with a generic Ubuntu VM, and use the Chef provisioning tool to:
- install packages for vim, git
- create user accounts, as specified in included JSON config files
- install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository
Afterwards, we'll see how easy it is to package our newly provisioned VM
#!/usr/bin/env sh | |
brew update | |
brew install rbenv | |
brew install ruby-build | |
brew install openssl | |
CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` rbenv install 2.0.0-preview1 |
Changes:
-
this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .
ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.
-
this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.
This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.
NOTE: THIS PATCH DOES NOT APPLY. Falcon's performance patches have not been updated for p362. See the comments for a fork that uses the Rails Express patch set instead.
This installs a patched ruby 1.9.3-p362 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
# Inspired by https://github.com/7hunderbird | |
# Execute via `curl -fs https://gist.github.com/raw/4569096/373e78aa18b438e74f04a782dd5ca7416b2cb50a/countdown.rb | ruby` | |
# in the terminal | |
require 'Date' | |
today = Date.today | |
deadline = Date.new(2013, 03, 04) | |
num_of_days = (deadline - today).to_i |
This installs a patched ruby 1.9.3-p484 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
#!/usr/bin/env sh | |
if ! which md5sum > /dev/null; then | |
echo Install md5sum | |
exit 1 | |
fi | |
if ! which curl > /dev/null; then | |
echo Install curl | |
exit 1 |
#!/usr/bin/env bash | |
if [[ $1 != [yY] ]] ; then | |
echo 'Ensure this is executed in your bundled project.' | |
echo 'i.e. where the Gemfile is located' | |
ehco 'you should run 'bundle clean' first to ensure you don't check unused gems | |
echo "Type 'Y/y' to proceed" | |
read proceed |