LoginSignup
7
6

More than 5 years have passed since last update.

JRubyでRuby on Rails4を動かす

Last updated at Posted at 2013-10-17

はじめに

JRuby使って、Rails4を動かした時にちょっと戸惑ったので、メモしておく。

構築方法

Rails開発環境の構築(rbenvでRuby導入からBundler、Rails導入まで)
このqiita記事が、良いです。JRubyでもほぼ同じ方法で綺麗に構築できます。
実行時の接頭辞にjruby -Sを忘れないでね。

一旦確認

$ jruby -S bundle exec rails server

Ruby on Rails  Welcome aboard.png

サクっと表示されるはず。

Controllerを作ってみる

$ jruby -S bundle exec rails generate controller Hello index

9fb5e366-731d-66b5-f462-bd97d576f3a2.png

残念賞

JCEを持ってきましょう

Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 Download
上記のURLからDLしてください。
解凍後、local_policy.jar, US_export_policy.jarを取り出して、jre\lib\security\に入れましょう。
(当然ですが、上書き前のファイルは退避させておくと良いと思います。)

再度、確認

$ jruby -S bundle exec rails server

TestRails4.png

おつかれさまでした。

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6