JRuby-環境構築
■localPCにjrubyをインストール
Getting Started with JRuby
・http://kenai.com/projects/jruby/pages/GettingStarted
・必要なGemsモジュールをセットアップしておいた方がよい
gem update --system
gem install jruby-openssl --include-dependencies
gem install rails --include-dependencies
gem install facets --include-dependencies
gem install activerecord-jdbc-adapter --include-dependencies
■Eclipse プラグイン版 RadRails のインストール
・http://www.db.is.kyushu-u.ac.jp/rinkou/javaintro/rdt.html
■EclipseにJRubyをインストール
・[ヘルプ]−[ソフトウェア更新]
・名前:Dynamic Languages Toolkit
ロケーション:http://download.eclipse.org/technology/dltk/updates/
・DLTK 2.0の「Ruby 開発ツール」をダウンロード
・[ウインドウ]−[設定]−[Java]−[ビルドパス]−[ユーザー・ライブラリー]
⇒作成した「JRuby」を選択し、[JARの追加]
(もしここで設定画面を表示できないエラー出たら、eclipseを最新版にするしかないかも)
・[実行]−[外部ツール]−[外部ツールを開く]
⇒インストールしたディレクトリ/bin/jruby.batを追加
■動作確認
・[ファイル]→[新規]→[Rubyプロジェクト]
→Rubyプロジェクトを作成
・[新規プロジェクト]→[新規]→[空のRubyスクリプト]
→eg:helloworld.rb
・rbファイルにソース追加
puts "Hello JRuby #{JRUBY_VERSION} World!!"
・実行してみる
■参考サイト
・http://takeyu-web.com/jruby/2010/07/post.html
・http://codezine.jp/article/detail/1647?p=2