Skip to content

Instantly share code, notes, and snippets.

@fluxsaas
Forked from lightyrs/gist:1108708
Created September 9, 2011 12:38
Show Gist options
  • Save fluxsaas/1206102 to your computer and use it in GitHub Desktop.
Save fluxsaas/1206102 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