Windows installation JRuby Rails
Download JRuby directly, without Ruby.
Http://jruby.org/download
The installation package can be equipped with environment variable%jruby_home% and so on.
Install bundler (may not need to install, forget)
gem install bundler
Installing rails:
4.2.6
rbenv rehash
Modify Gemfile
Bundle Install
Run
With Ubuntu.
JRuby Rails runs on tomcat-generated war
Installing Warbler
Gem Install Warbler
Installing sprockets
Gem Install sprockets
Pre-compiled assets
Rake Assets:precompile
Generate War:
Bundle Install
Warble.bat Config force=1
Warble
Get a war with the same name as the app, such as Hello.war.
Run in Tomcat
The tomcat launch parameter is added to the environment variable (catalina.sh):
Secret_key_base= 78ec95bf6126680a7b57db21f9db456f2570fd09ac3a6b3fe9dbe5d52f3377c0cff79999ec50c8afb32d2c74afd33e2199fc4f0cbd72ee243a59dcf49 D34e5e4
The secret key can be generated by itself and must have. Build command:
Bundle EXEC Rake Secret
The war can be imported to run.
Windows installation JRuby generate war to Tomcat run