Ruby : cannot load such file -- google/apis/drive_v3 (LoadError)

155 Views Asked by At

I am using ruby to write a script for downloading resources from google drive.

This script is running successfully locally, but while running on Bitrise it gives the following error;

ruby config_downloader.rb -f Android -p 550 -g ''
/Users/vagrant/.rbenv/versions/2.6.9/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- google/apis/drive_v3 (LoadError)
    from /Users/vagrant/.rbenv/versions/2.6.9/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from config_downloader.rb:1:in `<main>'

Here is my Gemfile;

# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

source "https://rubygems.org"

gem 'fastlane'
gem 'google-api-client'
gem 'google-apis-drive_v3'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
1

There are 1 best solutions below

1
Nikhil Sathawara On

After playing around for a while, I've got the issue which was missing gem file in the Bitrise config file called "bitrise.yml".

By adding the missing gem via "sudo gem install google-apis-drive_v3", the issue is resolved.

Thanks for the support!!!