Skip to content

Instantly share code, notes, and snippets.

@mmalawski
Created October 7, 2012 14:20
Show Gist options
  • Save mmalawski/3848514 to your computer and use it in GitHub Desktop.
Save mmalawski/3848514 to your computer and use it in GitHub Desktop.

Revisions

  1. mmalawski created this gist Oct 7, 2012.
    79 changes: 79 additions & 0 deletions 10.8 Rails Development Environment
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,79 @@
    # Mac OSX Mountain Lion
    # Ruby on Rails Development Environment

    # RVM
    curl -L https://get.rvm.io | bash -s stable && rvm install 1.9.3 && rvm install 1.8.7
    echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
    source ~/.bash_profile


    # Disable rarely used RDOC
    echo 'install: --no-ri --no-rdoc' >> ~/.gemrc
    echo 'update: --no-ri --no-rdoc' >> ~/.gemrc


    # Gems
    gem install rails -v2.3.11 && bundler && unicorn


    # Homebrew
    ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)


    # Git
    brew install git


    # Tools
    brew install ack wget curl


    # MySQL
    brew install mysql


    # Setup MySQL user
    mysql_install_db --verbose --user=`root` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp


    # MongoDB
    brew install mongodb


    # Redis
    brew install redis


    # Memcached
    brew install memcached libmemcached


    # Sphinx
    brew install sphinx


    # imagemagick
    brew install imagemagick


    # Other Necessities
    brew install colordiff nginx sqlite libxml2 libxslt readline v8 rsync lzma geoip lzo


    # Setup Launch Agents (adjust version numbers below)
    mkdir -p ~/Library/LaunchAgents


    # MySQL Launch Agents
    cp /usr/local/Cellar/mysql/5.5.28/com.mysql.mysqld.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist


    # MongoDB Launch Agents
    cp /usr/local/Cellar/mongodb/2.2.0-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist


    # Redis Launch Agents
    cp /usr/local/Cellar/redis/2.4.17/homebrew.mxcl.redis.plist
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist