Ruby 1.9.2 ソースビルド
Rubyサイトからソースをダウンロードし、回答、ビルド、インストールを行う。例として今回は 2011年9月12日最新安定板の 1.9.2-p290 を使用。
torao@clove$ wget "ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz" --2011-09-12 18:23:10-- ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz => `ruby-1.9.2-p290.tar.gz' ftp.ruby-lang.org をDNSに問いあわせています... 221.186.184.68 ftp.ruby-lang.org|221.186.184.68|:21 に接続しています... 接続しました。 anonymous としてログインしています... ログインしました! ==> SYST ... 完了しました。 ==> PWD ... 完了しました。 ==> TYPE I ... 完了しました。 ==> CWD /pub/ruby/1.9 ... 完了しました。 ==> SIZE ruby-1.9.2-p290.tar.gz ... 11182217 ==> PASV ... 完了しました。 ==> RETR ruby-1.9.2-p290.tar.gz ... 完了しました。 長さ: 11182217 (11M) 100%[==========================================================>] 11,182,217 1.20M/s 時間 8.8s 2011-09-12 18:23:19 (1.22 MB/s) - `ruby-1.9.2-p290.tar.gz' へ保存終了 [11182217] torao@clove$ tar zxvf ruby-1.9.2-p290.tar.gz ruby-1.9.2-p290/ ruby-1.9.2-p290/.cvsignore ruby-1.9.2-p290/.document … torao@clove$ cd ruby-1.9.2-p290 torao@clove$ ./configure --prefix=/usr/local/ruby-1.9.2-p290 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu … torao@clove$ make gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -I. -I.ext/include/x86_64-linux -I./include -I. -DRUBY_EXPORT -o main.o -c main.c gcc -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -W … torao@clove$ sudo make install [sudo] password for torao: ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./tool/generic_erb.rb -c -o encdb.h ./template/encdb.h.tmpl ./enc enc encdb.h unchanged make -f enc.mk RUBY="./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb " MINIRUBY="./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb " srcs … torao@clove$ cd /usr/local torao@clove$ sudo ln -s ruby-1.9.2-p290 ruby
あとは /usr/local/ruby/bin にパスを通して終わり。