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
Ruby会議でのBundler2の話.pdf
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
vividmuimui
October 05, 2017
Programming
60
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby会議でのBundler2の話.pdf
vividmuimui
October 05, 2017
More Decks by vividmuimui
See All by vividmuimui
あるチームでの技術選定で考えてること(外部向けに修正版)
vividmuimui
0
20
開発組織まわりで最近考えているあれこれ
vividmuimui
0
49
bundle-update.pdf
vividmuimui
0
130
Dependabot vs BundleUpdate+LockDiff
vividmuimui
0
110
あなたの知らないRuboCopの設定
vividmuimui
0
260
最近(2019/02/03)の #Ruby , #Rails , #Bundler 事情
vividmuimui
0
170
Jasperはいいぞ!
vividmuimui
0
61
Danger CI
vividmuimui
0
120
tigとかaliasなし生活を送ってみて改めてgitを覚えてる話
vividmuimui
0
140
Other Decks in Programming
See All in Programming
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
300
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
290
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
880
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
4
3.5k
The Rails Doctrine Decade
koic
2
590
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
How to build a perfect <img>
jonoalderson
1
6.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Optimising Largest Contentful Paint
csswizardry
37
4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
Building the Perfect Custom Keyboard
takai
2
910
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
My Coaching Mixtape
mlcsv
0
360
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
It's Worth the Effort
3n
188
29k
Transcript
Ruby 会議でのBundler2 の Ruby 会議でのBundler2 の 話 話 2017/10/05 社内LT
@vividmuimui
このスライドは、基本的にはこの発表をなぞっています youtube: speakerdeck: rfc#6: http://rubykaigi.org/2017/presentations/0xColby.html https://www.youtube.com/watch?v=sZX7SK3hxk4 https://speakerdeck.com/colby/what-weve-been-up-to-with-bundler https://github.com/bundler/rfcs/pull/6
この1 年で入ったやつの紹介 この1 年で入ったやつの紹介 bundle doctor bundle add bundle plugin
bundle doctor bundle doctor skip
bundle add bundle add $ bundle add rspec # Gemfile
# Added at 2017-10-04 00:17:42 +0900 by vivid_muimui: gem "rspec", "~> 3.6" 以下のようにオプションも指定できる $ bundle add rails --version "~> 5.0.0" --source "https://gems.example.com" --group "development" bot とかなら使いみちあるかも?
bundler plugins bundler plugins module MyBundlerPlugin class Plugin < Bundler::Plugin::API
command "new-command" def exec(command, args) puts "Hello World" end end end $ bundle new-command Hello World! という感じで、新しいコマンドを用意できる ほかにも、以下のようにも出来たりするみたい Bundler::Plugin::API.hook "before-install-all" do |deps| puts "Installing #{deps.map(&:name).join(', ')} !" end $ bundle install Installing rack ! Using bundler 1.15.4 ... ...
bundler plugins bundler plugins 作成したplugin のinstall は以下の感じ $ bundle plugin
install my-bundler-plugin # Gemfile plugin 'my-bundler-plugin' まだまだ、 に関してはまだまだ機能もdocument もbug x も足りてないらしい
1.16 が1 系の最後のバージョンになる予定 1.16 が1 系の最後のバージョンになる予定
bundler2 bundler2
Removing Removing Ruby2.3 未満のサポート Gem le Source Shortcuts persistent command
arguments いくつかかいつまんで紹介
Ruby2.3 未満のサポート Ruby2.3 未満のサポート skip
Gem le Source Shortcuts Gem le Source Shortcuts gem "rack",
github: "user/repo" gem "rack", bitbuket: "user/repo" といった がなくなり、以下の書き方をするようになる gem "gem1", source: "https://mygemserver.private" gem "gem2", git: "https://github.com/user/repo.git" gem "gem3", path: "path/to/gem" ただ、今まで書いていたように を書いておけば も書ける git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end gem "rack", github: "user/repo"
bundle show bundle show 現状の は機能がたくさんあり複雑 の2 つのコマンドに分割
bundle viz bundle viz plugin として切り出される $ bunldle plugin install
bundle-viz
bundle console bundle console skip
persistent command arguments persistent command arguments オプション引数を自動で記録する処理がなくなる たとえば、今は以下のコマンドを実行すると、今は自動でcon g ファイルに
を記録される が、されなくなる $ bundle install --path foo 毎回常にoption を指定するか、以下のようにcon g を明示的に設定する必要がある $ bundle config path foo
–with –without –path –system –with –without –path –system での上記option を削除
代わりに を使う
bundle package bundle package から に変更
Adding Adding Removing に比べて少ない Global gem & extension cache Speci
c platforms
Global gem & extension cache Global gem & extension cache
複数アプリケーションで同じgem を使っていたり、 複数ruby バージョンで同じgem を使っているときにinstall が高速化される
Speci c platforms Speci c platforms 難しくてよくわかんなかった><
Changing Changing bundle bundle update bundle1 との互換性 gems.rb
bundle bundle 今は が実行されるが、usage が表示されるようになる
bundle update bundle update 今は、 $ bundle update で全gem のupdate
が走るが、明示的に指定する必要がある $ bundle update <gem-name> $ bundle update --all のどちらかになる
bundle1 との互換性 bundle1 との互換性 下位互換はないので注意する必要がある で したら では動かない なので、チームメンバーの足並み合わせて、せーのであげる必要がある (
複数プロジェクトを担当していて、同じruby バージョンを使っている場合は、プロジェクトをまたい でも足並み揃える必要があるかも?)
gems.rb gems.rb で した時に生成されるファイルは になる 今までの , は普通に使える deprecation warning
もでない と が両方存在していたときは、 が優先される
今後 今後
Ruby2.5 にdefault gem としてbundler が入る Ruby2.5 にdefault gem としてbundler が入る
どのbundler のバージョンが入るかはhsbt さんと相談と言っていたように聞こえた でも、2 系になりそうな雰囲気だった( 曖昧)
毎年メジャーリリースをする 毎年メジャーリリースをする ruby のリリースのように毎年年末あたりにメジャーリリースが行うようになる ruby のサポートのバージョンを変えたり、古い機能を削除したりなど
おまけ おまけ 見てて気になったやつ rfc#6 した時のデフォルトのインストール先が 以下になる