Skip to content

Instantly share code, notes, and snippets.

@lightyrs
Created July 27, 2011 04:52
Show Gist options
  • Save lightyrs/1108708 to your computer and use it in GitHub Desktop.
Save lightyrs/1108708 to your computer and use it in GitHub Desktop.
lion rails 3 setup
# 2011-07-25
#
# Mac OS X 10.7
# Xcode 4.1
# Install Lion.
# Xcode
# Download Xcode from Mac App Store.
#install homebrew
sudo mkdir /usr/local
sudo chown -R `whoami` /usr/local
curl -Lsf http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C/usr/local
echo 'export PATH=/usr/local/bin:/usr/local/sbin:$PATH' >> ~/.bash_profile
brew install git
brew update
brew install wget
brew install macvim
brew install ctags
#install rvm
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
#install ruby 1.9.2
CC=/usr/bin/gcc-4.2 rvm install 1.9.2
rvm use 1.9.2@rails --create --default
rvm wrapper 1.9.2@rails textmate
#install mysql
brew install mysql
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mysql.server start
/usr/local/Cellar/mysql/5.5.14/bin/mysqladmin -u root password '123456'
#set mysql utf-8
[mysqld]
collation_server=utf8_unicode_ci
character_set_server=utf8
#vim configuration files
git clone git://github.com/akitaonrails/vimfiles.git ~/.vim
cd ~/.vim/
git submodule update --init
ln -s ~/.vim/vimrc ~/.vimrc
cd ~/.vim/bundle/Command-T/ruby/command-t/
ruby extconf.rb
make
#textmate bundles git
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd !$
git clone git://github.com/drnic/ruby-on-rails-tmbundle.git "Ruby on Rails.tmbundle"
git clone git://github.com/rspec/rspec-tmbundle.git RSpec.tmbundle
git clone git://github.com/handcrafted/handcrafted-haml-textmate-bundle.git HAML-Handcrafted.tmbundle
#textmate bundles from subversion
mkdir -p /Library/Application\ Support/TextMate
cd !$
svn co http://svn.textmate.org/trunk ./
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment