• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

MacPortsを利用してインストールしたrubyのインストールオプションを知りたくなったので、調べました。

port installed rubyで確認

下記の場合、thread_hooksがvariantsとして指定されインストールされている:

   1  % port installed ruby
   2  The following ports are currently installed:
   3  ruby @1.8.7-p72_2+thread_hooks (active)

MacPortsのrubyで指定可能なインストールオプション:variants

portでインストールされるrubyには下記のvariantsがあります:

   1  % port variants ruby
   2  ruby has the variants:
   3    universal
   4    darwin
   5    darwin_7
   6    tk: enable tk support
   7    mactk: enable MacTk (Tk.framework without X11) support
   8    thread_hooks: apply Apple's thread_hooks patch
   9    no_doc: do not install rdoc documents

また後でvariantsを追加してインストール場合は、別のrubyとみなされるようなので、deactivateかuninstallする必要があるようです:

* As「ruby +mactk」and「ruby +mactk +thread_hooks」are recognized as another, if you add to「thread_hooks」after installing「ruby +mactk」, you need to uninstall or be deactivate「ruby +mactk」.

http://oamaxa2.u-abel.net/wordpress/?p=30

posted by Png satoko on Tue 2 Jun 2009 at 05:28

LimeChatが動いて、文字化けなくircが見れるようになったのでメモ。

環境

  • MacOS X 10.5.6
  • ruby
       1  % port installed ruby
       2  The following ports are currently installed:
       3  ruby @1.8.7-p72_2+thread_hooks
       4  ruby @1.8.7-p160_1+thread_hooks+universal (active)
    
  • RubyCocoa-0.13.2-OSX10.5universal.dmg

自分でハマったところ

  • MacPortsで入れるrubyが+universal
  • OS Xのバージョンに合ったdmgで (最初はRubyCocoa-0.13.2.1-OSX10.4universal.dmgをインストールしようとしてた)
  • LimeChatのEncodingをUTF8に
posted by Png satoko on Tue 2 Jun 2009 at 05:24

メモ:LimeChatを入れようとしたのだけど、なぜかうまく動かず:
stack level too deep(SystemStackError) のエラー

LimeChatは--enable-sharedオプションで入れたrubyでないとダメだということだが、MacPortsで入れたrubyの場合だと、+universalで入れないといけないということらしい(下記)

You need to build the ruby interpreter as an universal build when using it with RubyCocoa. Try +universal variant.

http://groups.google.com/group/limechatosx/browse_thread/thread/4c814a119a556be7

MacPortsの+universal variantについて

Building with the +universal variant changes this to always include both Intel and PowerPC code

http://trac.macports.org/wiki/howto/buildUniversal

Rubyの--enable-sharedオプションについて

--enable-sharedというのはrubyコマンドのほとんどをダイナミックリンクライブラリ(libruby.so)として外に出すオプションだ。必須でないプラットホームでも --enable-shared を付けておくと eruby や mod_ruby を作るときにダイナミックリンクになるので便利である (でなければスタティックリンクになる)。

http://i.loveruby.net/ja/rhg/cd/build.html

posted by Png satoko on Tue 2 Jun 2009 at 05:20

deploy用ブランチを作るのもいいのですが、tagの方が気軽に作成できてマージしなくてもいいので楽チンではないかと探したらありました:

Deploying trunk or tags with capistrano

written by paul on October 28th, 2008 @ 08:34 PM
http://www.pgrs.net/2008/10/29/deploying-trunk-or-tags-with-capistrano

ML上でJamis Buckさんにアドバイス貰ってできたそうです。

   1  set :repository_root, "http://www.example.com/svn/myproject" 
   2  set(:tag) { Capistrano::CLI.ui.ask("Tag to deploy (or type 'trunk' to deploy from trunk): ") }
   3  set(:repository) { (tag == "trunk") ? "#{repository_root}/trunk" : "#{repository_root}/tags/#{tag}" }

posted by Png satoko on Tue 2 Jun 2009 at 04:55