fastlane wasn't found on your system. did you run 'sudo gem install fastlane'? - fastlane

When I try to run the command from my project it failed. But the fastlane command get the session. If I try to run app it shows the error as
2021-07-27 fastlane wasn't found on your system. did you run 'sudo gem install fastlane'?
2021-07-27 [FATAL] trying to use produce but fastlane wasn't located. see error above as well.
My machine has
% fastlane -v
fastlane installation at path:
/Users/name/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/fastlane-2.188.0/bin/fastlane
-----------------------------
[✔] 🚀
fastlane 2.188.0
% which fastlane
/Users/name/.rvm/rubies/ruby-3.0.0/bin/fastlane

Fixed the above by installing the fastlane in the /usr/local/bin folder
sudo gem install -i /usr/local/bin fastlane

Related

I need help to build ionic with iOS i have this problem :

ionic cordova build ios
ng run app:ionic-cordova-build --platform=ios
Error: Unknown argument: platform
[ERROR] An error occurred while running subprocess ng.
ng run app:ionic-cordova-build --platform=ios exited with exit code 1.
Re-running this command with the --verbose flag may provide more
information.
It looks like you're running into permission issues. If you are installing npm-packages then it might possible that you are getting an EACCES error when trying to install a package globally. This means you do not have permission to write to the directories npm uses to store global packages and commands.
Try running commands:
sudo chmod u+x -R 775 ~/.npm
sudo chown $USER -R ~/.npm
or you can just run any npm command with sudo, that should get resolve your issue.
sudo ionic cordova build ios
I'd recommend you to take a look at https://docs.npmjs.com/getting-started/fixing-npm-permissions

Running sbt in a Docker Container

I am trying to use Github actions for my scala project and created a Docker workflow for it. Basically, I am trying to install sbt into my container and run the project.
Dockerfile looks like this:
FROM centos:centos8
ENV SCALA_VERSION 2.13.1
ENV SBT_VERSION 1.5.2
RUN yum install -y epel-release
RUN yum update -y && yum install -y wget
# INSTALL JAVA
RUN yum install -y java-11-openjdk
# INSTALL SBT
RUN wget http://dl.bintray.com/sbt/rpm/sbt-${SBT_VERSION}.rpm
RUN yum install -y sbt-${SBT_VERSION}.rpm
RUN wget -O /usr/local/bin/sbt-launch.jar http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/$SBT_VERSION/sbt-launch.jar
WORKDIR /root
EXPOSE 8080
RUN sbt compile
CMD sbt run
But when I push anything, I get the following error:
The command '/bin/sh -c wget http://dl.bintray.com/sbt/rpm/sbt-${SBT_VERSION}.rpm' returned a non-zero code: 8
When I check the link manually (by setting the sbt version), I see indeed bintray responds with 403 forbidden error but status.bintray.com tells all systems are operational.
Am I doing something wrong or is something wrong with bintray?
Forbidden doesnt mean non operational.
I think that url is incorrect as its not hosted on bintray rather jfrog, please see section on Centos which states
remove old Bintray repo file
https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html

Cannot install Cocoapods, keep getting error

I have been trying to install cocoapods but I keep getting an error. I have tried the following commands and get the same result.
sudo gem install cocoapods
sudo gem install -n /usr/local/bin cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20200726-37338-rvqxhv.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.13.1/gem_make.out
After a lot of searching I finally came across a solution that I believe works. If you are use Mac OS Catalina you need to use Brew.
Open Terminal on your Mac.
Now, run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
Install cocoapods using brew
brew install cocoapods
cocoapods is ready to use now!

Bundle install is throwing error when installing coffee-script-source -v '1.6.3'

I'm using Ruby 2.0.0 and Rails 4 but I'm getting an error with coffee-script when I generate new rails project
Installing coffee-script-source (1.6.3)
Errno::EACCES: Permission denied - /usr/local/rvm/gems/ruby-2.0.0-p247/build_info/coffee-script-source-1.6.3.info
An error occurred while installing coffee-script-source (1.6.3), and Bundler cannot continue.
Make sure that gem install coffee-script-source -v '1.6.3' succeeds before bundling.
I just ran into the same problem. Run
sudo bundle update
inside your new site directory. Ruby will then have no trouble installing whatever packages it needs to.
I has the same issue and came across your post when I googled it. I had to run:
sudo gem install turbolinks -v '1.3.0'
sudo gem install uglifier -v '2.2.1'
sudo gem install multi_json -v '1.8.2'
before I could get the bundle install to complete. However, if you are reading the rails tutorial (http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-rubygems), it says not to worry if that stage fails, as the railsgem file is updated and you manually run:
bundle update
bundle install
Hope this is of some help.
do once: sudo rails new demo
and then for other projects just rails new project_name

Running knife commands from Capistrano task

I'm attempting to configure the knife commandline tool via a capistrano task, and running into an issue when it hits the following line
system "knife configure --yes --defaults -s ... -c ... -u ... -r ..."
it says this
Could not find net-ssh-2.6.5 in any of the sources
Run `bundle install` to install missing gems.
I do have this gem installed and I believe it comes with chef. I assume this has something to do with the environment that Capistrano runs in.
Uninstall Chef:
gem uninstall chef
And re-install it:
gem install chef