[root@localhost src]# wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz --2013-09-10 00:21:07-- http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz cache.ruby-lang.org をDNSに問いあわせています... 103.245.222.184 cache.ruby-lang.org|103.245.222.184|:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 13652782 (13M) [application/octet-stream] `ruby-2.0.0-p247.tar.gz' に保存中 100%[=======================================================================================================================================================================================================================>] 13,652,782 1.93M/s 時間 9.0s 2013-09-10 00:21:16 (1.44 MB/s) - `ruby-2.0.0-p247.tar.gz' へ保存完了 [13652782/13652782]
解凍してディレクトリへ移動
[root@localhost src]# tar xvzf ruby-2.0.0-p247.tar.gz ruby-2.0.0-p247/ ruby-2.0.0-p247/eval_jump.c ruby-2.0.0-p247/transcode_data.h ruby-2.0.0-p247/complex.c ・・・・ [root@localhost src]# cd ./ruby-2.0.0-p247 [root@localhost ruby-2.0.0-p247]#
configure
[root@localhost ruby-2.0.0-p247]# ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu ・・・ config.status: creating ruby-2.0.pc
make
root@localhost ruby-2.0.0-p247]# make CC = gcc LD = ld LDSHARED = gcc -shared ・・・ Total: 16006 (3620 undocumented) 77.38% documented Elapsed: 1715.3s
make install
[root@localhost ruby-2.0.0-p247]# make install CC = gcc LD = ld LDSHARED = gcc -shared ・・・ test-unit 2.0.0.0 [root@localhost ruby-2.0.0-p247]#
gemをinstall
[root@localhost ruby-2.0.0-p247]# find / -type f -name 'setup.rb' /usr/local/src/ruby-2.0.0-p247/ext/tk/lib/tkextlib/tktrans/setup.rb ・・・ /usr/lib/ruby/gems/1.8/gems/rubygems-update-1.8.24/setup.rb /usr/lib64/ruby/gems/1.8/gems/erubis-2.7.0/setup.rb /usr/lib64/ruby/gems/1.8/gems/rubygems-update-2.0.6/setup.rb /usr/lib64/ruby/gems/1.8/gems/rmagick-2.13.2/setup.rb /usr/lib64/ruby/gems/1.8/gems/sqlite3-1.3.7/setup.rb /usr/lib64/ruby/gems/1.8/gems/bundler-1.3.5/lib/bundler/setup.rb /usr/lib64/ruby/gems/1.8/gems/bundler-1.2.3/lib/bundler/setup.rb ・・・ [root@localhost ruby-2.0.0-p247]# ruby /usr/lib64/ruby/gems/1.8/gems/rubygems-update-2.0.6/setup.rb RubyGems 2.0.6 installed Parsing documentation for rubygems-2.0.6
railsをinstall (バージョンは3.2.14を指定)
[root@localhost rubygems-update-2.0.6]# gem install rails -v 3.2.14 Fetching: i18n-0.6.5.gem (100%) Successfully installed i18n-0.6.5 ・・・ Parsing documentation for rails-3.2.14 Installing ri documentation for rails-3.2.14 29 gems installed
確認
[root@localhost rubygems-update-2.0.6]# rails -v Rails 3.2.14 [root@localhost rubygems-update-2.0.6]# ruby -v ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]