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
Ruby会議でのBundler2の話.pdf
Search
vividmuimui
October 05, 2017
Programming
58
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
17
開発組織まわりで最近考えているあれこれ
vividmuimui
0
29
bundle-update.pdf
vividmuimui
0
130
Dependabot vs BundleUpdate+LockDiff
vividmuimui
0
100
あなたの知らないRuboCopの設定
vividmuimui
0
260
最近(2019/02/03)の #Ruby , #Rails , #Bundler 事情
vividmuimui
0
170
Jasperはいいぞ!
vividmuimui
0
55
Danger CI
vividmuimui
0
120
tigとかaliasなし生活を送ってみて改めてgitを覚えてる話
vividmuimui
0
130
Other Decks in Programming
See All in Programming
What We Talk About When We Talk About XP
m_seki
2
360
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.5k
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
3
1k
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
220
typoなんかねぇよ
raspython3
0
660
「AI時代、配布するPythonコードをどう守るか: 難読化の実験と判断軸」 #PyconJP2026
pkshadeck
PRO
2
160
[KotlinConf Extended South Korea 2026] KotlinConf 2026 발표자 후기
wisemuji
0
100
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
210
AIの中の人になってみる
htkym
0
160
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
380
Featured
See All Featured
Scaling GitHub
holman
464
140k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
310
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
The Invisible Side of Design
smashingmag
301
52k
Optimizing for Happiness
mojombo
378
71k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Product Roadmaps are Hard
iamctodd
55
13k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
490
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 した時のデフォルトのインストール先が 以下になる