mogui

@mogui247

The only sane way to setup Fastlane on a mac

macOS pre-installed ruby it’s quite unusable to use modern ruby tools, during time I struggled to have a proper setup for it.
 Since I found myself installing Fastlane on new machines and everytime I have to remember wich way it worked better I’m writing this as a refernce primarly for me, but I am sure it could be helpful for others too.

Brew

If you develop on a mac and you haven’t already installed brew you are mad.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

rbenv

We’ll need a ruby version manager to remain sane I found rbenv to be the less evil:

brew install rbenv ruby-build

Add this to your .bashrc or whatever your poison is to load bash or zsh or ???:

if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

ruby

Install a newer ruby with rbenv:

rbenv install 2.4.1
rbenv global 2.4.1

Fastlane

Finally we can install Fastlane whith the new shiny ruby environment we have:

gem install fastlane

this way you can install also cocoapods, for example, and remain sane.

Hacker Noon is how hackers start their afternoons. We’re a part of the @AMIfamily. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.
To learn more, read our about page, like/message us on Facebook, or simply, tweet/DM @HackerNoon.
If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!

More by mogui

Topics of interest

More Related Stories