Skip to content

Commit

Permalink
switched out rvm in favor of rbenv and ruby_build, added some zsh spe…
Browse files Browse the repository at this point in the history
…cific things
  • Loading branch information
rargulati committed Jun 2, 2012
1 parent 2d6cef6 commit 1e7eb2d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 12 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ Install
-------

Before you run this script, you need compilers like GCC, LLVM, and Clang.

*NOTE from rargulati: If you haven't installed X11 (window system) as part of your normal 10.5/10.6 installation,
install it from the OS disk. Installation instructions are available online. IF, like me, you
do not have the disk, it's easier to download and install all 3 of Xcode, Xquartz, and the gcc tools
so that they will play nice.
Get them via [OS X GCC Installer](https://github.com/kennethreitz/osx-gcc-installer/)
if you're on Snow Leopard (OS X 10.6) or
[Command Line Tools for XCode](https://developer.apple.com/downloads/index.action)
Expand All @@ -19,6 +22,9 @@ Run the script:

What it sets up
---------------
*NOTE: this is a fork of the original. Where the original preferred rvm, I've
decided to go with rbenv + ruby_build. Some pieces of this installation still
do not work for all builds (bash v zsh, imagemagick is not playing nice; will fix soon)

* SSH public key (for authenticating with services like Github and Heroku)
* Homebrew (for managing operating system libraries)
Expand All @@ -28,7 +34,7 @@ What it sets up
* Postgres (for storing relational data)
* Redis (for storing key-value data)
* ImageMagick (for cropping and resizing images)
* RVM (for managing versions of the Ruby programming language)
* Ruby Build and RBenv (for managing ruby environments)
* Ruby language (for writing general-purpose code)
* Bundler gem (for managing Ruby libraries)
* Rails gem (for writing web applications)
Expand Down
2 changes: 2 additions & 0 deletions heroku
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ echo "Installing the heroku-accounts plugin for using multiple Heroku accounts..

echo "Installing the heroku-config plugin for pulling config variables locally to be used as ENV variables ..."
heroku plugins:install git://github.com/ddollar/heroku-config.git

echo "done!"
26 changes: 18 additions & 8 deletions mac
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ echo "Put Homebrew location earlier in PATH ..."
export PATH='/usr/local/bin:$PATH'" >> ~/.zshrc
source ~/.zshrc

echo "Installing memcached and mysql..."
brew install memcached mysql

echo "Installing Postgres, a good open source relational database ..."
brew install postgres --no-python
brew install postgres

echo "Initialize mysql and postgres databases..."
initdb /usr/local/var/postgres
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

echo "Installing Redis, a good key-value database ..."
brew install redis
Expand All @@ -35,12 +42,15 @@ echo "Installing ImageMagick, good for cropping and re-sizing images ..."
echo "Installing QT, used by Capybara Webkit for headless Javascript integration testing ..."
brew install qt

echo "Installing RVM (Ruby Version Manager) ..."
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
echo "
# RVM
[[ -s '/Users/`whoami`/.rvm/scripts/rvm' ]] && source '/Users/`whoami`/.rvm/scripts/rvm'" >> ~/.zshrc
echo "Installing rbenv ..."
brew update
brew install rbenv ruby-build

# adding rbenv to path for acces to command-line util stuff
echo 'export PATH="$HOME/ .rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source ~/.zshrc

bash < <(curl -s https://raw.github.com/thoughtbot/laptop/master/ruby)
bash < <(curl -s https://raw.github.com/thoughtbot/laptop/master/heroku)
# execute script for installing ruby and heroku dependencies
bash < <(curl -s https://raw.github.com/thoughtbot/laptop/master/ruby)
bash < <(curl -s https://raw.github.com/thoughtbot/laptop/master/heroku)
15 changes: 13 additions & 2 deletions ruby
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
echo "Installing Ruby 1.9.2 stable and making it the default Ruby ..."
rvm install 1.9.2-p290
rvm use 1.9.2 --default
rbenv install 1.9.3-p125
rbenv global 1.9.3-p125
rbenv rehash

echo "Installing Rails to write and run web applications ..."
gem install rails --no-rdoc --no-ri
gem install bundler
bundle

echo "Installing the Heroku gem to interact with the http://heroku.com API ..."
gem install heroku --no-rdoc --no-ri
Expand All @@ -19,3 +22,11 @@ echo "Installing the git_remote_branch gem for fast feature branch creating and

echo "Installing the foreman gem for serving your Rails apps in development mode ..."
gem install foreman --no-rdoc --no-ri

echo "since we have redis, let's add resque which is great for queuing and processing background jobs..."
gem install resque

echo "useful bootstrap gem for front end development"
gem install twitter-bootstrap-rails

echo "done!"

0 comments on commit 1e7eb2d

Please sign in to comment.