Sencha cmdに必要なRuby
いざSencha Touch製アプリをデプロイするためにビルドしようと
sencha app build
をしたけど、
[code lang="bash"]
[ERR] Detected ruby version 2.0.0 was not less than 2.0. Please install ruby 1.8
or 1.9.
[ERR]
Did not find a system installed ruby runtime
Please install ruby for this platform and ensure that
a ruby command compatible with 1.8 or 1.9 is available
on the system path.
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Failed to detect ruby
[ERR]
[ERR] Total time: 7 seconds
[ERR] The following error occurred while executing this line:
[/code]
ではじまるエラーが。
Sencha TouchでSencha Cmd使いたかったらJavaだけじゃなくRuby、しかも1.8か1.9を入れないとダメなんですね。。。
MacのMervericはRuby2.0がデフォルトで入ってきます。
なので、時間をかけてrvm経由で1.9を入れました。
次の時のために念のため手順をメモ。
まずはGCCを入れます。
[code lang="bash"]
sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2<
[/code]
次にRVMを入れます。
[code lang="bash"]
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled
source $HOME/.rvm/scripts/rvm
[/code]
いよいよRubyを入れます。
[code lang="bash"]
rvm install 1.9.3
[/code]
これで sencha app build がちゃんと走るようになりました。