Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
how require kill spring
Search
Fumiaki MATSUSHIMA
March 25, 2015
Programming
220
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
how require kill spring
永和システムマネジメント・DeNA 技術交流会発表資料
Fumiaki MATSUSHIMA
March 25, 2015
More Decks by Fumiaki MATSUSHIMA
See All by Fumiaki MATSUSHIMA
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
200
Learning from performance improvements on GraphQL Ruby
mtsmfm
1
1.4k
Ruby で作る Ruby (物理)
mtsmfm
1
310
GraphQL Ruby benchmark
mtsmfm
1
930
タイムアウトにご用心 / Timeout might break application state
mtsmfm
6
2.7k
Build REST API with GraphQL Ruby
mtsmfm
0
410
GraphQL Ruby をちょっとだけ速くした / Make graphql-ruby faster a bit
mtsmfm
1
810
Gaming PC on GCP
mtsmfm
0
820
How to introduce GraphQL to an existing React-Redux application
mtsmfm
1
330
Other Decks in Programming
See All in Programming
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
1.9k
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
110
The Rails Doctrine Decade
koic
2
510
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
550
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
350
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
230
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
140
AWSに止められる覚悟してますか?
morizo_1984
2
510
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
Java 27新機能 / Java 27 new features
kishida
2
200
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
210
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
260
GitHub's CSS Performance
jonrohan
1033
470k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to Talk to Developers About Accessibility
jct
2
560
Designing for Timeless Needs
cassininazir
1
520
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
460
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
790
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Abbi's Birthday
coloredviolet
4
10k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
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 場所 どこ