Cannot install Gemfile and Gemfile lock gems with bundle inside a Docker container in Jenkins Pipeline

242 views
Skip to first unread message

Bekim Disha

unread,
Jun 21, 2018, 3:13:38 AM6/21/18
to ruby-bundler

I am spinning a docker container(alpine base) from a docker file inside a Jenkins pipeline.

The container installs:

ruby-rake and ruby-bundler


My working directory in this jenkins pipeline has Gemfile and Gemfile.lock I try to run bundle install in this working directory

when I try:

bundle install #running as a shell command in jenkins

I get:


`/` is not writable.
Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily. Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/. Resolving dependencies.............
Fetching rake 10.3.2 Retrying download gem from https://rubygems.org/ due to error (2/4):

Errno::ENOENT No such file or directory @ rb_sysopen - /.gem/ruby/2.4.0/cache/rake-10.3.2.gem Retrying download gem from https://rubygems.org/ due to error (3/4):
Errno::ENOENT No such file or directory @ rb_sysopen - /.gem/ruby/2.4.0/cache/rake-10.3.2.gem Retrying download gem from https://rubygems.org/ due to error (4/4):
Errno::ENOENT No such file or directory @ rb_sysopen - /.gem/ruby/2.4.0/cache/rake-10.3.2.gem Errno::ENOENT: No such file or directory @ rb_sysopen - /.gem/ruby/2.4.0/cache/rake-10.3.2.gem

An error occurred while installing rake (10.3.2), and Bundler cannot continue.
Make sure that `
gem install rake -v '10.3.2'` succeeds before bundling.
In Gemfile: aws_account_utils was resolved to 0.1.4, which depends on rake

What do I have to do to install my Ruby gems of Gemfile and Gemfile.lock?

Reply all
Reply to author
Forward
0 new messages