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
how require kill spring
Search
Fumiaki MATSUSHIMA
March 25, 2015
Programming
1
200
how require kill spring
永和システムマネジメント・DeNA 技術交流会発表資料
Fumiaki MATSUSHIMA
March 25, 2015
Tweet
Share
More Decks by Fumiaki MATSUSHIMA
See All by Fumiaki MATSUSHIMA
Learning from performance improvements on GraphQL Ruby
mtsmfm
1
1.1k
Ruby で作る Ruby (物理)
mtsmfm
1
210
GraphQL Ruby benchmark
mtsmfm
1
820
タイムアウトにご用心 / Timeout might break application state
mtsmfm
6
2.5k
Build REST API with GraphQL Ruby
mtsmfm
0
330
GraphQL Ruby をちょっとだけ速くした / Make graphql-ruby faster a bit
mtsmfm
1
730
Gaming PC on GCP
mtsmfm
0
730
How to introduce GraphQL to an existing React-Redux application
mtsmfm
1
250
Canary release in StudySapuri
mtsmfm
0
3.1k
Other Decks in Programming
See All in Programming
GraphRAGの仕組みまるわかり
tosuri13
8
520
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
1k
WindowInsetsだってテストしたい
ryunen344
1
220
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
670
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
620
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
530
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
260
Is Xcode slowly dying out in 2025?
uetyo
1
240
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
710
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
430
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
14
1.7k
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.5k
Featured
See All Featured
Optimizing for Happiness
mojombo
379
70k
Practical Orchestrator
shlominoach
188
11k
Faster Mobile Websites
deanohume
307
31k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
A better future with KSS
kneath
239
17k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Bash Introduction
62gerente
614
210k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Agile that works and the tools we love
rasmusluckow
329
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Transcript
(株)永和システムマネジメント @mtsmfm 松島 史秋 springの死について 私が知っている1つの方法
松島 史秋 GitHub, Twitter @mtsmfm
None
ある rails 3.2 案件
spring の死
spring の死 \LoadError/
TL;DR rails 上で requireするな
TL;DR rails 上で requireするな ※ ただし stdlib は除く
$ bundle exec spring rspec
Expected /... /break_spring/app/models /animal.rb to define Animal (LoadError)
None
あるから!
None
None
???
$ bundle exec spring rspec すると何が起きるか
※ spring 1.3.3 ※ rails 3.2 のデフォルト設定の場合 ※ rails 4
~> のデフォルト設定の場合は発 生しません
$ bundle exec spring rspec (1回目)
1. gem とか require 2. app 以下とか load 3. テスト実行
(1回目)
簡易 spring
None
require & load run command
None
$ bundle exec spring rspec (2回目、変更無)
(2回目、変更無) 1. gem とか require 2. app 以下とか load 3.
テスト実行
1. gem とか require 2. app 以下とか load 3. テスト実行
(2回目、変更無)
1. gem とか require 2. app 以下とか load 3. テスト実行
(2回目、変更無) fork 前 fork 後
1. gem とか require 2. app 以下とか load 3. テスト実行
(2回目、変更無) fork 前 fork 後
$ touch app/models/cat. rb
$ bundle exec spring rspec (3回目、変更有)
1. load したのを const_remove 2. テスト実行 3. const_missing で require
(3回目、変更有)
1. load したのを const_remove 2. テスト実行 3. const_missing で require
(3回目、変更有)
require 済
require ‘animal’ # => false
Expected /... /break_spring/app/models /animal.rb to define Animal (LoadError)
※ spring 1.3.3 ※ rails 3.2 のデフォルト設定の場合 ※ rails 4
~> のデフォルト設定の場合は発 生しません
1. gem とか require 2. app 以下とか load 3. テスト実行
4. const_missing で require
1. gem とか require 2. app 以下とか load 3. テスト実行
4. const_missing で require fork 前 fork 後
Rails 3 config.cache_classes = true (eager_load = true を兼ねてる) Rails
4 config.cache_classes = true config.eager_load = false
TL;DR rails 上で requireするな ※ ただし stdlib は除く
stdlib の イケてる require 場所 どこ