-
-
Save sarahmei/191402 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
cp ~/.profile ~/.profile.bak | |
echo 'export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"' > ~/.profile | |
. ~/.profile | |
echo 'Creating src directory' | |
mkdir ~/src | |
cd ~/src | |
echo 'Installing Git' | |
cd ~/src | |
if [ -f ~/Desktop/rubydownloads/git-1.7.1.tar.gz ] | |
then | |
cp ~/Desktop/rubydownloads/git-1.7.1.tar.gz . | |
else | |
curl -O http://kernel.org/pub/software/scm/git/git-1.7.1.tar.gz | |
fi | |
tar zxf git-1.7.1.tar.gz | |
cd git-1.7.1 | |
./configure --prefix=/usr/local | |
make | |
sudo make install | |
cd .. | |
echo 'Installed git at the following location:' | |
which git | |
echo 'Installing Ruby and Rubygems' | |
if [ -f ~/Desktop/rubydownloads/ruby-1.8.7-p174.tar.gz ] | |
then | |
cp ~/Desktop/rubydownloads/ruby-1.8.7-p174.tar.gz . | |
else | |
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz | |
fi | |
if [ -f ~/Desktop/rubydownloads/rubygems-1.3.5.tgz ] | |
then | |
cp ~/Desktop/rubydownloads/rubygems-1.3.5.tgz . | |
else | |
curl -O http://files.rubyforge.vm.bytemark.co.uk/rubygems/rubygems-1.3.5.tgz | |
fi | |
tar xzf ruby-1.8.7-p174.tar.gz | |
cd ruby-1.8.7-p174 | |
./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1 | |
make | |
sudo make install | |
cd .. | |
tar xzf rubygems-1.3.5.tgz | |
cd rubygems-1.3.5 | |
sudo /usr/local/bin/ruby setup.rb | |
cd .. | |
echo 'Installed Ruby and RubyGems. Now installing Rails.' | |
echo 'It may ask for a password. If so, please enter the password you use to log on to this machine.' | |
sudo gem install rails --version 2.3.9 --no-rdoc --no-ri | |
echo 'Installing some other useful gems...' | |
sudo gem install sqlite3-ruby --no-rdoc --no-ri | |
sudo gem install heroku --no-rdoc --no-ri | |
sudo gem install rspec rspec-rails --no-rdoc --no-ri | |
sudo gem install cucumber --no-rdoc --no-ri | |
sudo gem install webrat --no-rdoc --no-ri | |
echo 'Your system now has the following gems:' | |
gem list --local | |
echo '*************************************************************************************' | |
echo 'Done installing! Head back to the wiki page for steps to ensure everything works.' | |
echo '*************************************************************************************' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment