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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
790
AIエージェントを前提としたプラットフォーム エンジニアリング:GKEで作るAgent-Ready Golden Path
legalontechnologies
PRO
2
240
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
250
私がブラウザを自作したくなった理由
supurazako
1
240
同じWAFが、攻撃の“形”は弾く── 正当な“形”の不正は通す
kuroneko13
0
200
認知負荷をGemini で溶かす — GKE 基盤「Orbit」における AI エージェントの実践
sansantech
PRO
1
300
My broken English still works: speaking at global OSS events
naruoga
0
100
モバイルアプリ開発概論2026
recruitengineers
PRO
5
600
システム思考で問題に対処する
yussak
0
300
Agent 時代の Kaggle 展望 / kaggle-in-the-agentic-era
upura
1
750
QAエンジニア起点で進める、SmartHRにおける信頼性向上について
kaomi_wombat
1
140
Forza Horizon 6 のテレメトリ機能で 自動運転に使えそうな学習データを集める話
henjin0
0
180
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
490
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Become a Pro
speakerdeck
PRO
31
6.2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.3k
How to Talk to Developers About Accessibility
jct
2
510
Chasing Engaging Ingredients in Design
codingconduct
0
270
The Spectacular Lies of Maps
axbom
PRO
1
910
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
350
Odyssey Design
rkendrick25
PRO
2
760
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
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!