Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastlane command not found

I am trying to install fastlane. I have Xcode installed. I installed fastlane using the command sudo gem install fastlane. I now go into my project folder and type fastlane init and get the error:

-bash: fastlane: command not found.

I see that fastlane is installed and can see it here

/Users/username/.gem/ruby/2.0.0/gems/fastlane-1.70.0/bin

on my Mac.

I tried adding this to my PATH, but I still get the same error. My path is

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:./Users/username/.gem/ruby/2.0.0/gems/

What am I missing here?

like image 487
Viswanth Chadalawada Avatar asked Apr 02 '16 04:04

Viswanth Chadalawada


4 Answers

Add the following line to your bash profile:

export PATH="$HOME/.fastlane/bin:$PATH"

You can either close the terminal session and restart it or run source ~/.bash_profile to load your configuration and then you can go so you start using fastlane 🚀

like image 135
baichao zeng Avatar answered Oct 11 '22 19:10

baichao zeng


I got run into similar issue last week. I installed fastlane using homebrew on mac, but it was showing the same error.

I tried installing it using Ruby and it worked like a charm. Here is the command.

sudo gem install fastlane -NV

Also seems like you have not installed command line tools for xcode.

Install them using xcode-select --install

like image 29
atitpatel Avatar answered Oct 11 '22 21:10

atitpatel


I met this issue because of installing zsh, the below two steps solve my problem:

  1. open ~/.zshrc
  2. save path

    2.1 if you install fastlane with Homebrew

    Copy export PATH="$HOME/.fastlane/bin:$PATH" on the bottom line.

    2.2 if you install fastlane with RubyGems

    Copy export PATH="/usr/local/bin/fastlane"" on the bottom line.

  3. save upon file and try fastlane init, everything is OK!

like image 24
mistdon Avatar answered Oct 11 '22 20:10

mistdon


  1. In the terminal type cd ~/ to go to your home folder
  2. Type touch .bash_profile to create your new empty file
  3. Type open -e .bash_profile to open the file
  4. Enter export PATH="$HOME/.fastlane/bin:$PATH" and save
  5. Restart terminal (not sure needed?)
like image 17
Sunkas Avatar answered Oct 11 '22 19:10

Sunkas