-
-
Save danhodos/542909 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)" | |
echo "PATH=/usr/local/bin:/usr/local/share/npm/bin:/Developer/usr/bin:\$PATH; export PATH" >> ~/.profile | |
source ~/.profile | |
echo "Your path is now $PATH" | |
brew install git | |
brew update | |
# installing mysql | |
brew install mysql | |
if [[ "$?" -eq "0" ]]; then | |
MYSQL_VERSION=`brew list mysql | awk -F/ '{print $6}' | head -n1` | |
/usr/local/Cellar/mysql/$MYSQL_VERSION/bin/mysql_install_db | |
cp /usr/local/Cellar/mysql/$MYSQL_VERSION/com.mysql.mysqld.plist ~/Library/LaunchAgents | |
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist | |
else | |
echo "Unable to install mysql, weak" | |
exit 1 | |
fi | |
# install mongo | |
brew install mongo | |
if [[ "$?" -eq "0" ]]; then | |
MONGODB_VERSION=`brew list mongodb | awk -F/ '{print $6}' | head -n 1` | |
cp /usr/local/Cellar/mongodb/$MONGODB_VERSION/org.mongodb.mongod.plist ~/Library/LaunchAgents | |
launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist | |
else | |
echo "Unable to install mongodb, weak" | |
exit 1 | |
fi | |
# install a bunch of utils | |
for i in node rlwrap npm ack sqlite wget; do | |
brew install $i | |
done | |
# install rvm for ease of use | |
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
echo "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"" >> ~/.profile | |
source ~/.profile | |
# setup the default Ruby Enterprise Edition (REE) version | |
rvm install ree | |
rvm use ree --default --passenger | |
# install some gems into the default ruby's global gemset | |
rvm gem install bundler | |
rvm gem install capistrano | |
rvm gem install capistrano-ext | |
rvm gem install awesome_print | |
rvm gem install wirble | |
rvm gem install gemedit | |
# install passenger | |
rvm gem install passenger | |
passenger-install-apache2-module | |
# Add the following lines to your Apache config file: | |
LoadModule passenger_module /Users/jlecour/.rvm/gems/ree-1.8.7-2010.02@global/gems/passenger-2.2.15/ext/apache2/mod_passenger.so | |
PassengerRoot /Users/jlecour/.rvm/gems/ree-1.8.7-2010.02@global/gems/passenger-2.2.15 | |
PassengerRuby /Users/jlecour/.rvm/bin/passenger_ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment