Skip to content

Loading…

Use simpler tokaido install #4

Closed
wants to merge 5 commits into from

3 participants

@hone
Rails Girls member

I've been working with @wycats on getting @tokaido ready to use for Rails Girls Amsterdam. This is the result of the work. It's a binary distribution of ruby and the gems needed to run rails, so they don't have to deal with rvm, homebrew, or compiling. I spent a long time with to no avail helping a girl with linking errors at Rails Girls Krakow and I think this will fix the issue.

@hone hone referenced this pull request in railsgirls/railsgirls.github.com
Merged

Update OS X install guide based on work from tokaido #14

@hone hone added a commit to hone/railsgirls.github.com that referenced this pull request
@hone hone clean up os x install guide based on railsgirls/installation-scripts#4 8aee0ea
@hone hone closed this
@hone
Rails Girls member

merged this in.

@szemek szemek pushed a commit to webmuses/guides that referenced this pull request
@hone hone clean up os x install guide based on railsgirls/installation-scripts#4 2bcf0b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 78 additions and 33 deletions.
  1. +37 −0 rails-install-osx-rvm.sh
  2. +41 −33 rails-install-osx.sh
View
37 rails-install-osx-rvm.sh
@@ -0,0 +1,37 @@
+set -e
+
+echo "Installs Homebrew for installing other software"
+/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
+brew update
+
+echo "Installs RVM (Ruby Version Manager) for handling Ruby installation"
+curl -kL get.rvm.io | bash -s stable
+source ~/.rvm/scripts/rvm
+
+echo "Install Ruby"
+rvm install 1.9.3-p194
+rvm use 1.9.3-p194 --default
+
+gem install bundler --no-rdoc --no-ri
+gem install rails --no-rdoc --no-ri
+
+echo -e "\n- - - - - -\n"
+echo -e "Now we are going to print some information to check that everything is done:\n"
+
+echo -n "Should be brew 0.8 or higher: brew "
+brew -v
+echo -n "Should be sqlite 3.7.3 or higher: sqlite "
+sqlite3 --version
+echo -n "Should be rvm 1.6.32 or higher: "
+rvm --version | sed '/^.*$/N;s/\n//g' | cut -c 1-10
+echo -n "Should be ruby 1.9.3-p194: "
+ruby -v | cut -d " " -f 2
+echo -n "Should be Rails 3.2.2 or higher: "
+rails -v
+echo -e "\n- - - - - -\n"
+
+echo "If the versions match, everything is installed correctly. If the versions
+don't match or errors are shown, something went wrong with the automated process
+and we will help you do the installation the manual way at the event.
+
+Congrats!"
View
74 rails-install-osx.sh
@@ -1,37 +1,45 @@
-set -e
-
-echo "Installs Homebrew for installing other software"
-/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
-brew update
-
-echo "Installs RVM (Ruby Version Manager) for handling Ruby installation"
-curl -L get.rvm.io | bash -s stable
-source ~/.rvm/scripts/rvm
-
-echo "Install Ruby"
-rvm install 1.9.3-p125
-rvm use 1.9.3-p125 --default
-
-gem install bundler --no-rdoc --no-ri
-gem install rails --no-rdoc --no-ri
-
-echo -e "\n- - - - - -\n"
+#!/bin/sh
+PACKAGE_URL="http://dl.dropbox.com/u/132031/tokaidoapp.tgz"
+TOKAIDO_DIR="$HOME/.tokaidoapp"
+RUBY_VERSION="1.9.3-p194"
+
+function mktmpdir() {
+dir=$(mktemp -t tokaido-XXXX)
+rm -rf $dir
+mkdir -p $dir
+echo $dir
+}
+
+tmpdir=$(mktmpdir)
+cd $tmpdir
+echo "Downloading Tokaido.app"
+curl $PACKAGE_URL -\# -o - | tar zxf -
+
+echo "Setting up Tokaido.app"
+mkdir -p $TOKAIDO_DIR
+mkdir -p $TOKAIDO_DIR/rubies
+mkdir -p $TOKAIDO_DIR/gems
+mv .tokaidoapp/rubies/$RUBY_VERSION $TOKAIDO_DIR/rubies/
+mv .tokaidoapp/gems/$RUBY_VERSION $TOKAIDO_DIR/gems/
+mv .tokaidoapp/tokaidoapp.sh $TOKAIDO_DIR/
+
+rm -rf $tmpdir
+
+echo "[[ -s $HOME/.tokaidoapp/tokaidoapp.sh ]] && source $HOME/.tokaidoapp/tokaidoapp.sh" >> $HOME/.profile
+source $HOME/.tokaidoapp/tokaidoapp.sh
+
+echo -e "\n- - - - - - - - - \n"
echo -e "Now we are going to print some information to check that everything is done:\n"
-echo -n "Should be brew 0.8 or higher: brew "
-brew -v
-echo -n "Should be sqlite 3.7.3 or higher: sqlite "
-sqlite3 --version
-echo -n "Should be rvm 1.6.32 or higher: "
-rvm --version | sed '/^.*$/N;s/\n//g' | cut -c 1-10
-echo -n "Should be ruby 1.9.3p125: "
-ruby -v | cut -d " " -f 2
-echo -n "Should be Rails 3.2.2 or higher: "
+echo " ,;;;, ,;;;,"
+echo -n ";;;' ';' ';;; Should be ruby 1.9.3p194: "
+ruby -v | cut -c 1-14
+echo ";;; ;;;"
+echo -n " ';;, ,;;' Should be Rails 3.2.3: "
rails -v
-echo -e "\n- - - - - -\n"
-
-echo "If the versions match, everything is installed correctly. If the versions
-don't match or errors are shown, something went wrong with the automated process
-and we will help you do the installation the manual way at the event.
+echo " ';;,;;'"
+echo " ';'"
+echo -e "\n- - - - - - - - - \n"
-Congrats!"
+echo "Done!"
+echo "Please restart your terminal."
Something went wrong with that request. Please try again.