結論を言えば、ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin11.4.2]を使うのであれば、
brew install libksba
しとけってこと。
経緯としては、
$ which rails
/usr/local/Cellar/ruby/1.9.3-p362/bin/rails
とでるのにもかかかわらず、
$ rails
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
となって堂々巡りになってしまった。
何度もgem install railsをバージョン変えて試した。しかしどうにもならないので、RVMをいれて解決しようとしたら、
$ rvm requirements
This is the step that might give you some trouble. Read through it and just follow all of the steps.
Notes for Mac OS X 10.7.2, Xcode 4.2.1.
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
こんなふうにいわれた。もしかしてとおもって、
brew install libksba
したら、RVM使わなくても問題なく動作するようになった。
こうしたら、railsコマンドでの堂々巡りはなくなった。