よく rvm や rbenv を使ってMacに複数バージョンのrubyをインストールする例を見るんですが、「それhomebrewでもできるよ」って思ったのでメモ。 とりあえず最新版を入れる場合 2012/7/27時点ではruby-1.9.3-p194がインストールされるみたいです。 $ brew install ruby $ export PATH=/usr/local/bin:$PATH $ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) 別のバージョンのrubyをインストールする 続いて一つ前のバージョンを入れるために、利用可能なrubyのバージョン一覧を表示。 $ brew versions ruby 1.9.2-p290 git checkout 1f32fa4 /opt/local/Library/Formula/ruby.r
環境構築erの皆様、ごきげんよう。今日も今日とて、大掃除してたはずがでてきたマンガ読了してたかのごとく、コード書くはずがrcファイル書いたりプラグイン試したりして一日が終わったりしていますか? ふとhomebrewをupdateしたら新しいサブコマンドが2つほど*1入りました。その使い方を調べていたら、それとは別にhomebrewの便利コマンドを知ったのでご紹介。 準備 まずはhomebrewを最新にしましょう。 $ brew update # バージョン確認 $ brew -v 0.8 2011年3月12日にバージョン0.8がリリースされた*2ようですね。 更新のあるformulaを調べる $ brew outdated git (1.7.3.2, 1.7.4.1 < 1.7.4.4) mongodb (1.6.5-x86_64 < 1.8.1-x86_64) readline (6.1
標準で入っているphpにmycryptを入れたくなったのでメモしておきます。 homebrew https://github.com/mxcl/homebrew でlibmcryptを入れておく。 brew install mcrypt MacOSXに入っているphpと同じバージョンのソースを取得して展開。 cd php-5.3.4/ext/mcrypt phpize ./configure make sudo cp modules/mcrypt.so /usr/lib/php/extensions/no-debug-non-zts-20090626 システム環境設定の共有から Web共有 を On/Off してApache再起動。 phpinfo()関数を実行してmcryptが組込まれたことを確認しましょう。
だいぶ前にMacのパッケージ管理をMacPortsからhomebrewに移行してみて、ここまで特に不便なこともなく使えているので、移行時に調べたりメモったりした内容を忘れないように書いときます。 参考ページ Github: mxcl/homebrew Homebrew — MacPorts driving you to drink? Try Homebrew! mxcl/homebrew Wiki なお、homebrewをインストールするためには以下の条件を満たす必要があります。 (Xcode と Command Line Tools for Xcode のインストール方法は後述します) Requirements An Intel CPU OS X 10.5 or higher Command Line Tools for Xcode or Xcode 3 via: Installatio
Homebrewに「tap」というコマンドが追加されました。このコマンドを使う事で、公式以外でフォーミュラを公開していたリポジトリをhomebrewの中に取り込むことができ、$ brewコマンドで扱えるようになります。 これにより今までhomebrewにはなかったvimやApache、phpといったフォーミュラを簡単に追加できるようになりました。また、自分のgithubアカウントにアップしているフォーミュラがある場合は、それも取り込むことができます。 brew tap の使い方 今回追加されたのは、tapとuntapの2つです。 tapはリポジトリを追加し、untapは追加した特定のリポジトリを削除するコマンドです。使い方は以下になります。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く