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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Fumiaki MATSUSHIMA
March 25, 2015
Programming
210
1
Share
how require kill spring
永和システムマネジメント・DeNA 技術交流会発表資料
Fumiaki MATSUSHIMA
March 25, 2015
More Decks by Fumiaki MATSUSHIMA
See All by Fumiaki MATSUSHIMA
Learning from performance improvements on GraphQL Ruby
mtsmfm
1
1.3k
Ruby で作る Ruby (物理)
mtsmfm
1
270
GraphQL Ruby benchmark
mtsmfm
1
900
タイムアウトにご用心 / Timeout might break application state
mtsmfm
6
2.7k
Build REST API with GraphQL Ruby
mtsmfm
0
390
GraphQL Ruby をちょっとだけ速くした / Make graphql-ruby faster a bit
mtsmfm
1
780
Gaming PC on GCP
mtsmfm
0
810
How to introduce GraphQL to an existing React-Redux application
mtsmfm
1
310
Canary release in StudySapuri
mtsmfm
0
3.3k
Other Decks in Programming
See All in Programming
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
440
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
3
1.8k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.3k
GitHub Copilot CLIのいいところ
htkym
2
1.2k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
160
AIエージェントの隔離技術の徹底比較
kawayu
0
460
dRuby over BLE
makicamel
2
300
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
210
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
800
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
ふつうのFeature Flag実践入門
irof
7
3.5k
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
How STYLIGHT went responsive
nonsquared
100
6.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
820
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How to build a perfect <img>
jonoalderson
1
5.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
550
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
170
Agile that works and the tools we love
rasmusluckow
331
21k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
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 場所 どこ