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経由で入れたfastlaneがcommand not foundと仰るならrbenv使ってはどうだろう

Last updated at Posted at 2019-12-17

要点

環境構築で、bundle経由でfastlane等をinstallしたが、

$ bundle exec fastlane dev

を叩いたところ、command not foundとerrorが出た。

bundle 2.1.0による問題らしいが、それを知らずに自己解決した話。
同じ問題にぶち当たって、解決方法を求めている人は、maybe resolvedadvice1advice2あたりだけ見ればいいと思う。

ready

さぁ環境構築しよう!

$ bundle install

・・・

Bundle complete! 3 Gemfile dependencies, 90 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

よし成功だ!

deploy

開発したので、bundle経由で入れたfastlaneで配信するぞ!

$ bundle exec fastlane dev

・・・

bundler: command not found: fastlane
Install missing gem executables with `bundle install`

はっ?
なんでー?どうしてー?

$ bundle list
Gems included by the bundle:

・・・

  * fastimage (2.1.7)
  * fastlane (2.134.0)
  * fourflusher (2.3.1)
 
・・・

Use `bundle info` to print more detailed information about a gem

ちゃんとあるじゃん?でもコマンド叩くとcommand not foundってでるじゃん?

maybe resolved

もう普通にgem install fastlaneしたりとか色々ググって出たものをかたっぱしから試したけど解決しないの。

最終的にRubyのversionか?Catalinaが悪いか?systemのRuby使ってるのがいかんのか?とか思って、次のコマンドの順で叩いてたぶん解決した。(たぶんというのは、fastlaneで別のエラー出て、他の作業をやり始めたので、deployされるまで確認していないため。)

長いのでコマンドだけ羅列していく。

$ brew install brew install rbenv ruby-build
$ rbenv install 2.6.5
$ rbenv global 2.6.5
$ rbenv exec gem install bundler
$ rbenv rehash
$ rbenv exec bundle install
$ rbenv exec bundle exec fastlane dev

・・・

[✔] 🚀 
[11:11:10]: ----------------------------------------
[11:11:10]: --- Step: Verifying fastlane version ---
[11:11:10]: ----------------------------------------
[11:11:10]: Your fastlane version 2.134.0 matches the minimum requirement of 2.68.0  ✅
[11:11:10]: ------------------------------
[11:11:10]: --- Step: default_platform ---
[11:11:10]: ------------------------------
[11:11:10]: Driving the lane 'ios dev' 🚀
[11:11:10]: -----------------------
[11:11:10]: --- Step: cocoapods ---
[11:11:10]: -----------------------
・・・

ζ*'ヮ')ζ < キマシタワァ!

advice1

どうもbundleの最新版2.1.0に問題があるらしい…
それをたまたま踏み抜いてた模様。

<追記#2019-12-18_12:45>
・ bundler version 1.17.3でも自分の環境では同様に発生しているので、versionが問題ではなさそう。

bundleが入ってない状態から入れて起きたし、アップデートしたわけじゃないから気づくの無理っす。
ただ、bundleのissueは見逃していた気がするので、issue建てにいくか見に行けよってのが最短だったかもしれない。疑わしいとこ多すぎるのもつらいな。

advice2

bundlerのversionが問題なら、version下げたものをinstallしたらいいじゃん。との助言。

自分の環境は色々ためしすぎたせいか、gem install bundler:2.0.0とかだとPermission errorが出て、sudo gem install bundler:2.0.0 -n /usr/local/binでローカル環境にinstalは
成功するのだけど、bundle --versionでversion確認すると2.1.0って出てうまく入らない…。
bundleをuninstallしてからやれば上手くいくのだろうか?

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?