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
1.6k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
如何透過 Warbler 在 JVM 上部署 Rails 應用
Jason Lee
September 11, 2015
Other Decks in Technology
See All in Technology
AIで政治は変わるのか? — 中高生と考えたAI時代の民主主義(東海高校サタデープログラム)
eitarosuda
0
210
データレイクの「見えない問題」を可視化する
sansantech
PRO
1
250
認証認可だけじゃない! ID管理の構成要素と ライフサイクルを意識しよう
ritou
1
370
きのこカンファレンス2026_肩書きを外したとき私は誰か
yamasatimi
1
110
Hatena Engineer Seminar 37 jj1uzh
jj1uzh
0
300
AWS Security Hub CSPMの成功・失敗体験
cmusudakeisuke
0
610
AI-DLCを “そのまま導入しなかった”話 ~組織に合わせてアジャストした 私たちの実践共有~
hiroramos4
PRO
1
470
秘密度ラベル初心者が第1歩でつまづかないための「設計・運用」ポイント
seafay
PRO
1
530
5分でわかるDuckDB Quack
chanyou0311
4
280
背中から、背中へ /paying forward to community
naitosatoshi
0
190
本当の”仕事”を手放せる未来が見えた
mu7889yoon
0
200
次世代ランサムウェア対策の考察 / 20260704 Mitsutoshi Matsuo
shift_evolve
PRO
4
1.1k
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
55k
The Pragmatic Product Professional
lauravandoore
37
7.3k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
370
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
320
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
400
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!