Created
September 15, 2013 01:47
-
-
Save davidtingsu/6567379 to your computer and use it in GitHub Desktop.
install rails on soda lab computers running ubuntu 12.
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/bash | |
# to install rails and node on ubuntu in Soda Hall (UC Berkeley) without root access | |
# constraints: no root access. ~1536 MB limit. | |
# TODO: handle all cs169 dependencies | |
# https://github.com/saasbook/courseware/blob/5e6cd1f533cc86f8caa0ad0ed0a9fb84baf2a662/vm-setup/configure-image-0.10.2.sh | |
### RVM INSTALLATION ### | |
# https://rvm.io/rvm/install # single user installation | |
echo "Installing rvm ..." | |
cd ~/ | |
\curl -L https://get.rvm.io | bash -s -- --ignore-dotfiles | |
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile | |
# RVM POST-INSTALLATION MESSAGE | |
# * To start using RVM you need to run `source /home/cc/cs169/fa13/class/cs169-hp/.rvm/scripts/rvm` | |
# in all your open shell windows, in rare cases you need to reopen all shell windows. | |
# In case of problems: | |
# run and read: rvm notes | |
# read docs: http://rvm.io/ | |
# talk to us: http://webchat.freenode.net/?channels=rvm (http://freenode.net/faq.shtml#plusr) | |
# read cheatsheet: http://cheat.errtheblog.com/s/rvm | |
# watch screencast: http://screencasts.org/episodes/how-to-use-rvm | |
# open a bug report: https://github.com/wayneeseguin/rvm/issues | |
### RUBY INSTALLATION ### | |
# http://stackoverflow.com/a/18285986/1123985 | |
# https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm | |
# rvm list remote | grep 1.9.3 | wc -l #TODO: check if ruby-1.9.3 exists | |
echo "Installing ruby 1.9.3..." | |
rvm mount -r 1.9.3 | |
### RUBYGEMS INSTALLATION ### | |
rvm rubygems current | |
### CREATE RAILS3.2.13 GEMSET ### | |
echo "Installing Rails 3.2.13..." | |
rvm gemset create ruby3.2.13 && rvm [email protected] && gem install -v rails3.2.13 | |
### SQLLITE3 INSTALLATION ### | |
gem install sqlite3-ruby | |
### NODEJS INSTALLATION ### | |
# http://dstvns.com/setting-up-nodejs-on-webfaction-revised/ | |
# https://github.com/creationix/nvm # TODO: try using nvm to install nodejs | |
echo "Installing nodejs 0.10.18..." | |
cd ~/ && curl http://nodejs.org/dist/v0.10.18/node-v0.10.18.tar.gz | tarxz | |
cd node-v0.10.18 && ./configure --prefix=$HOME/node0.10.18 && make && make install | |
### PUT EXECUTABLES IN STARTUP SCRIPT ### | |
echo 'export PATH=$HOME/node0.10.18/bin:$PATH' >> $HOME/.bash_profile | |
echo 'source ~/.rvm/scripts/rvm' >> $HOME/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment