Windows 安裝JRuby 產生 war 到 tomcat 運行

來源:互聯網
上載者:User

標籤:for   key   ase   tomcat   pre   ubuntu   hello   download   運行   

Windows安裝JRuby Rails

直接下載 JRuby,不裝 Ruby。

http://jruby.org/download

該安裝包可以配好環境變數 %JRUBY_HOME% 等

安裝 bundler(可能不需要安裝,忘了)

gem install bundler

安裝rails:

gem install rails -v 4.2.6
rbenv rehash

修改GemFile

bundle install

運行

同Ubuntu。

JRuby Rails 運行於 tomcat產生war

安裝warbler

gem install warbler

安裝 sprockets

gem install sprockets

先行編譯assets

rake assets:precompile

產生 war:

bundle install

warble.bat config FORCE=1

warble

得到app同名的war,例如hello.war。

 

在tomcat運行

tomcat launch 參數加入環境變數(catalina.sh):

SECRET_KEY_BASE= 78ec95bf6126680a7b57db21f9db456f2570fd09ac3a6b3fe9dbe5d52f3377c0cff79999ec50c8afb32d2c74afd33e2199fc4f0cbd72ee243a59dcf49d34e5e4

該秘鑰可自己產生,必須有。產生命令:

bundle exec rake secret

匯入war即可運行。

Windows 安裝JRuby 產生 war 到 tomcat 運行

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.