Skip to content

Instantly share code, notes, and snippets.

@yangtheman
Forked from patrickgombert/kidsruby_installer.sh
Created January 17, 2012 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yangtheman/1625153 to your computer and use it in GitHub Desktop.
Save yangtheman/1625153 to your computer and use it in GitHub Desktop.
Kids Ruby Ubuntu Installer
#!/bin/bash
echo "Installing Kids Ruby!"
sudo apt-get install git
# rbenv
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo `export PATH="$HOME/.rbenv/bin:$PATH"` >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
mkdir ~/.rbenv/versions
# ruby 1.9.2
cd ~/.rbenv/versions/ruby* && wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.bz2
tar -jxvf ruby-1.9.2-p290.tar.bz2
cd ./ruby*
./configure --prefix=$HOME/.rbenv/versions/1.9.2-p290
make
make install
rbenv rehash
# ruby gems & bundler
mkdir ~/rubygems
cd ~/rubygems && wget http://rubyforge.org/frs/download.php/75573/rubygems-1.8.12.tgz
tar -zxvf rubygems-1.8.12.tgz
cd ./rubygems-1.8.12
sudo ruby setup.rb
sudo gem install bundler
# Kids Ruby
cd ~/ && git clone git://github.com/hybridgroup/kidsruby.git
cd ./kidsruby
sudo bundle install
# Desktop link
touch ~/Desktop/KidsRuby
echo "rbenv global 1.9.2-p290" >> ~/Desktop/KidsRuby
echo "ruby ~/kidsruby/main.rb" >> ~/Desktop/KidsRuby
chmod +x ~/Desktop/KidsRuby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment