Portageツリー(パッケージ管理のリポジトリみたいなの)をstableにしてもtestingにしてもRuby1.8系しか出なくて、昼間にTwitterでこんなことをつぶやいていました。

「あー、くそー、ebuild作るか―」と、Ruby1.8系のebuildを参考にしようと思いPortageツリー(/usr/portage/)を見てみたら・・・

   1  $ ls -l /usr/portage/dev-lang/ruby/
   2  total 116
   3  -rw-r--r-- 1 portage portage 64001 Jun 29 06:40 ChangeLog
   4  -rw-r--r-- 1 portage portage  4479 Jun 29 06:40 Manifest
   5  drwxr-xr-x 2 portage portage  4096 Jun 14 20:05 files
   6  -rw-r--r-- 1 portage portage   262 Aug 23  2008 metadata.xml
   7  -rw-r--r-- 1 portage portage  5427 Jun 21 23:35 ruby-1.8.6_p369.ebuild
   8  -rw-r--r-- 1 portage portage  5364 Jun 18 22:12 ruby-1.8.7_p174.ebuild
   9  -rw-r--r-- 1 portage portage  5716 Jun 21 02:35 ruby-1.9.1_p129-r1.ebuild
  10  -rw-r--r-- 1 portage portage  5538 May 24 21:35 ruby-1.9.1_p129.ebuild

気が抜けて思わずTwit

追記 09/07/11 以下は非推奨

「ebuildがあるってことは、マスクされてるのか!」というGentooユーザの直感により、/usr/portage/profiles/package.maskを編集。

   1  # Alex Legler <a3li@gentoo.org> (20 Mar 2009)
   2  # Ruby 1.9.1 for preliminary testing of libraries depending on it, bug 203706.
   3  # Expect (many) breakages and incompatibilities.
   4  # Want to help testing? #gentoo-ruby on Freenode
   5  >=dev-lang/ruby-1.9.1
   6  =dev-ruby/rubygems-1.3.1-r30

を以下のようにコメントアウトする。

   1  # Alex Legler <a3li@gentoo.org> (20 Mar 2009)
   2  # Ruby 1.9.1 for preliminary testing of libraries depending on it, bug 203706.
   3  # Expect (many) breakages and incompatibilities.
   4  # Want to help testing? #gentoo-ruby on Freenode
   5  #>=dev-lang/ruby-1.9.1
   6  #=dev-ruby/rubygems-1.3.1-r30

編集が終了すれば、インストールします。

追記 09/07/11 こっちが推奨. thanks, ursmさん!

/usr/portage以下はsyncすると元に戻ってしまうので、/etc/portage/package.unmaskを作成し、

   1  >=dev-lang/ruby-1.9.1
と書く。

   1  # ACCEPT_KEYWORDS="~x86" emerge ruby

インストールが終了したら、標準でRuby1.8ではなく1.9を使うようにします。

   1  # eselect ruby set ruby19
   2  Successfully switched to profile:
   3    ruby19                    
   4  
   5  # eselect ruby list
   6  Available Ruby profiles:
   7    [1]   ruby18 (with Rubygems)
   8    [2]   ruby19 (with Rubygems) *
   9  
  10  # ruby -v
  11  ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]

以上でインストール完了。

Gentooすばらしい。

posted by Png y_tsuda on Tue 7 Jul 2009 at 14:55 with 2 comments
Contents
GentooにRuby1.9をインストールした
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ