0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[メモ] bundle binstubsを設定してbundle exec を省略できるように

Last updated at Posted at 2020-08-04

やりたいこと

Bundlerを使っていて起動する時に

$ bundle exec fastlane --version

とするのが面倒なので
単に

$ fastlane --version

で起動させられるようにしたい。

やったこと

1. rbenv-binstubsをインストールする

$ brew install rbenv-binstubs

2. 各プロジェクト(リポジトリ)にbinstubsを設定する

$ bundle binstubs fastlane --path .bundle/bin
$ rbenv rehash

以下でもうまくいったがdeprecatedであるため非推奨:

$ bundle install --binstubs .bundle/bin
$ rbenv rehash

3. 確認する

$ which fastlane
/Users/foobarbaz/.rbenv/shims/fastlane
$ rbenv which fastlane
/path/to/your/repos/.bundle/bin/fastlane

のようにpathが出力されればshimsとpathが通っている

$ fastlane --version
fastlane 2.154.0

このように bundle exe なしで起動したらOK。

うまくいった環境

macOS 10.15.6
Ruby 2.7.1
rbenv 1.1.2
Homebrew 2.4.9
fastlane 2.154.0
iterm 3.3.12

参考資料

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?