Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
如何透過 Warbler 在 JVM 上部署 Rails 應用
Search
Jason Lee
September 11, 2015
Technology
2
1.6k
如何透過 Warbler 在 JVM 上部署 Rails 應用
Jason Lee
September 11, 2015
Tweet
Share
Other Decks in Technology
See All in Technology
American airlines ®️ USA Contact Numbers: Complete 2025 Support Guide
airhelpsupport
0
390
React開発にStorybookとCopilotを導入して、爆速でUIを編集・確認する方法
yu_kod
1
280
united airlines ™®️ USA Contact Numbers: Complete 2025 Support Guide
flyunitedhelp
1
340
高速なプロダクト開発を実現、創業期から掲げるエンタープライズアーキテクチャ
kawauso
2
9.4k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
50
20k
事業成長の裏側:エンジニア組織と開発生産性の進化 / 20250703 Rinto Ikenoue
shift_evolve
PRO
3
22k
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
960
LLM時代の検索
shibuiwilliam
2
180
マネジメントって難しい、けどおもしろい / Management is tough, but fun! #em_findy
ar_tama
7
1.1k
ビズリーチにおけるリアーキテクティング実践事例 / JJUG CCC 2025 Spring
visional_engineering_and_design
1
130
整頓のジレンマとの戦い〜Tidy First?で振り返る事業とキャリアの歩み〜/Fighting the tidiness dilemma〜Business and Career Milestones Reflected on in Tidy First?〜
bitkey
2
16k
Glacierだからってコストあきらめてない? / JAWS Meet Glacier Cost
taishin
1
160
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
The World Runs on Bad Software
bkeepers
PRO
69
11k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Fireside Chat
paigeccino
37
3.5k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Site-Speed That Sticks
csswizardry
10
690
What's in a price? How to price your products and services
michaelherold
246
12k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Transcript
如何透過 Warbler 在 JVM 上部署 Rails 應⽤用 Jason Lee (LeeChSien)
[email protected]
2015 / 09 / 11
關於我 • 李致賢 (Jason Lee) a.k.a LeeChSien • 即將畢業於政治⼤大學 (NCCU
CS Master) • as a Ruby Developer since 2012 • Web Developer in
想⽤用 Ruby / Rails 來開發產品, 但是...
客⼾戶的環境 你想像中
客⼾戶的環境 實際的情形
客⼾戶的環境 • 環境沒有 Ruby Runtime • 產品需要封裝 (保護 Source Code)
• Windows Only….
Charles Nutter @ Taipei (2014/04/29)
嘗試使⽤用 JRuby ?
JRuby Write once, run anywhere
JRuby
如何使⽤用 JRuby 開發?
JRuby 版本⽐比較 JRuby 1.7.0 Ruby 1.9.3 JRuby 1.7.4 Ruby 2.0
JRuby 9.0.0.0 Ruby 2.2
使⽤用相容的 Gems • For example:activerecord-jdbc-adapter
Migrate from MRI Rails 4.2 • byebug -> disable •
web-console -> disable • binding_of_caller • therubyracer -> therubyrhino
C Extension Alternatives • Nokogiri - pure java version •
RMagick - RMagick4J • therubyracer - therubyrhino JRuby Wiki:C-Extension-Alternatives
Thread-safety • Rails 本⾝身是 Thread-safe • 第三⽅方 Gems 必須是 Thread-safe
• Sidekiq Wiki:Problems-and-Troubleshooting#threading • 你的程式碼必須是 Thread-safe
Thread-safety • Global variables • Class variables • Class instance
variables
Race condition
None
Memoization
None
None
Mutex Lock
None
Archive Your App with Warbler
Warbler • Warbler 將你的 App 打包為可執⾏行的 .war files https://github.com/jruby/warbler •
Start Server? • Rake task?
Warbler • Configuration • warble.rb • web.xml.erb Warbler 1.4.X JRuby
1.7.X Warbler 2.0.0 rc JRuby 9.0.0.0
Compile .rb to .class warble.rb
Compile .rb to .class
JRuby-rack-worker web.xml.erb https://github.com/kares/jruby-rack-worker
Unlimited Strength Crypto • Install the "Unlimited Strength" policy files
from Oracle • Disable the crypto restriction programmatically JRuby Wiki:UnlimitedStrengthCrypto
Tzinfo-data • No timezone data source could be found. To
resolve this, either install TZInfo::Data
Demo https://github.com/LeeChSien/rails-warbler-boilerplate
Another Choice - TorqueBox
Thank you!