Fastlane for iOS · Installing Fastlane |

This is a companion discussion topic for the original entry at

can you upload the actual video of this lesson pls?

i can’t play the video thanks

Video is missing for part 1 lesson 4

Sorry about that. I’ll alert our video team and we’ll get the video available as soon as possible. :slight_smile:

The issue with the video for Section 1 Episode 4 is now fixed!

I can’t locate the name of the Ruby profile?

I’m not positive, but I think you’re asking about the name of your Terminal profile file (per Section 1 Episode 4 > Installing Ruby of the course)?

If I have that right, then the next question is which shell you’re using. If it’s bash, then I’d look for ~/.bash_profile and then ~/.profile'.bash` looks for these in that order, executing only the first of these that it finds.

So if you find a ~/.bash_profile, for example, that’ll be your profile, and you should make the recommended changes to this file. If you don’t find this, then look for '~/.profile`.

Hope that helps! :slightly_smiling_face:

When I do gem install bundler I get You don't have write permissions for the /usr/bin directory. the same as when I do gem install fastlane. I created in my user directory ~/ a .bash_profile file with the lines
export PATH=“usr/local/opt/rby/bin:$PATH”
export PATH="/usr/local/lib/ruby/gems/2.6.0/bin:$PATH"
Do I need to give permission in a way or do sudo, or is that not the recommended way and do I need to do something else? What is happening here? Btw I’m on a separate volume with the Catalina beta installed. Maybe I should switch to my Mojave volume?

There are a lot of variables here, but let’s see if I can help…

Per this Stack Overflow post, you’re hitting a directory that’s protected by Apple’s System Integrity Protection, or simply SIP, which ensures that only privileged processes can write to certain core directories.

I’d suggest trying the advice in the SO post and check out gem install's -n option, which allows you specify directories not locked down by SIP. You can also use the sudo prefix, again as shown in the SO post example.

Hope that helps!

Hello @brian_bee!

I noticed a small typo when you define a new path for Ruby: you typed usr/local/rby/bin instead of usr/local/ruby/bin.

Thank you for the videos on Fastlane!

After I installed fastlane, I got a different fastlane version and it does not appear to be installed in the same location as yours:

$ fastlane -v
fastlane installation at path:
fastlane 2.77.1

How can I make sure I use the most recent version of Fastlane?

Apologies for my slow reply…

The version of fastlane you’re seeing is quite old (in fastlane years :slight_smile:), as it dates back to January of this year. That implies that you’ve installed fastlane previously, either via the gem install method used in this course, or via the alternate homebrew method we advise against.

Per this detailed fastlane support thread, I’d suggest that you first uninstall* fastlane via both homebrew and gem (sudo gem uninstall faslane and brew cask uninstall fastlane). This should clear any unknown instances of fastlane that might be lingering on your mac. Then, I’d reinstall fastlane following the course instructions and repeat your check.

As far as ensuring that you’re on the current version of fastlane at any given time: There are a few ways to do this. First, running fastlane -v as you have should give you both the version number AND prompt you to run an updater if you’re not on the current version. For example, I just ran it now and got

# fastlane 2.129.0 is available. You are on 2.128.1.
# You should use the latest version.
# Please update using `sudo gem install fastlane`.

For that matter, running any fastlane command will run the same version check and give you the same alert to update fastlane if you’re not up to date. Finally, in later episodes of this course, we discuss how to build this check directly into your lanes, so that fastlane will not run if it’s not fully up to date. In production, this is absolutely recommended as a best practice.

Hope that helps…

Thanks for letting me know! :+1:

1 Like

In my case had problems while trying to initialize fastlane, after typing:

fastlane init

Terminal gets stuck with the label Bundle Update and nothing happens

Canceled the process and tried again with sudo:

sudo fastlane init

That did the trick in case anyone face same problem

Glad using sudo did the trick for you. :slightly_smiling_face:

FWIW, the purist response would likely be to point out that using sudo is dangerous (e.g., if you have similar issues with Homebrew and try prepending sudo to resolve them, brew will explicitly forbid doing this for safety reasons, and instead basically ask you to check permissions in the relevant directories).

But purism aside, this seems like a fine work-around if anyone else runs into this same issue. :+1:

1 Like

You’re absolutely right, my problem was that fastlane wasn’t giving any feedback about any error and that’s why I had to try with sudo.

Just finished part 1 and noticed that cert/sigh save profiles/certificates in the root directory of the project, what is the recommended approach to handle this files while working with git?

should profiles and certificates be excluded?

Sorry for the slow response. First, one thing that can help get you more helpful feedback is to include the verbose option (here, fastlane init --verbose). That said, in some cases, because fastlane is invoking so many lower level tools that it can be a bit difficult to get down to the core issue.

As to recommendations. First, the fastlane team recommends using match rather than cert/sigh in general. I cover the pros and cons in the course, and also point to their Codesigning Guide for specifics. You can also check out their documentation on the lower-level Credentials Manager for more information on how fastlane manages code signing credentials under the hood.

Hope that helps!

when I type “code .profile” appear error: “command not found: code”. Could I linked download code

Trying to install Fastlane but keep getting the following error:

Can’t install the software because it is not currently available from the Software Update server.

Any insights?