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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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.2k
Ruby で作る Ruby (物理)
mtsmfm
1
250
GraphQL Ruby benchmark
mtsmfm
1
870
タイムアウトにご用心 / Timeout might break application state
mtsmfm
6
2.6k
Build REST API with GraphQL Ruby
mtsmfm
0
370
GraphQL Ruby をちょっとだけ速くした / Make graphql-ruby faster a bit
mtsmfm
1
760
Gaming PC on GCP
mtsmfm
0
780
How to introduce GraphQL to an existing React-Redux application
mtsmfm
1
290
Canary release in StudySapuri
mtsmfm
0
3.2k
Other Decks in Programming
See All in Programming
SourceGeneratorのススメ
htkym
0
190
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
AgentCoreとHuman in the Loop
har1101
5
220
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
440
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1.1k
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
980
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
4
1.1k
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
140
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
Oxlintはいいぞ
yug1224
5
1.3k
Featured
See All Featured
The Language of Interfaces
destraynor
162
26k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
Amusing Abliteration
ianozsvald
0
92
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
WENDY [Excerpt]
tessaabrams
9
36k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Agile that works and the tools we love
rasmusluckow
331
21k
The SEO identity crisis: Don't let AI make you average
varn
0
62
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
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 場所 どこ