Skip to content

Instantly share code, notes, and snippets.

@hdemon
Created September 6, 2011 12:10
Show Gist options
  • Save hdemon/1197384 to your computer and use it in GitHub Desktop.
Save hdemon/1197384 to your computer and use it in GitHub Desktop.
Ruby 1.9.2 install script
#!/bin/bash
### rvm
# rvmをシングルユーザで入れることがオフィシャルで推奨されているので、sudoは付けない。
# 以下全て同様。
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.zshrc
### Ruby 1.9.2
sudo aptitude -y install \
build-essential \
bison openssl \
libreadline6 \
libreadline6-dev \
git-core \
zlib1g \
zlib1g-dev \
libssl-dev \
libyaml-dev \
libsqlite3-0 \
libsqlite3-dev \
sqlite3 \
libxml2-dev \
libxslt-dev \
autoconf \
libc6-dev \
ncurses-dev \
automake
# 重要パッケージのインストール。
# readlineはirbの履歴機能に必要。
rvm pkg install readline
rvm pkg install zlib
rvm pkg install openssl
# 本体のインストールとデフォルト設定
rvm install 1.9.2
rvm 1.9.2 --default
### Ruby on Rails 3.1
# 最後に'file 'lib' not found'と出るが気にしない。
rvm gem install rails
### ruby-debug
rvm gem install ruby-debug19
### ruby-debug-ide ... Eclipseを使うなら必要
#rvm gem install ruby-debug-ide
### MySQL/Ruby
# gemで入れようとすると依存関係解消に苦労するので、これだけはaptitudeで入れる。
sudo aptitude -y install libdbd-mysql-ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment