Caching using 'Gemfile.lock' fails

bundler
ruby
caching

#1

Hi,

I’m trying to use the caching recommendations as referenced in https://circleci.com/docs/2.0/caching/ . Whenever I attempt to use something like <project name>-{{ checksum "Gemfile.lock" }} as a key, I get the following error:

Error computing cache key: template: cacheKey:1:3: executing "cacheKey" at <checksum "Gemfile.lo...>: error calling checksum: open /home/circleci/<project name>/Gemfile.lock: no such file or directory.

This is with both the circleci/ruby2.3 and circleci/ruby2.4.1 docker images.


#2

Did you add this to hide the name of the repo in this post, or is your actual output <project-name>, if so this is the problem. You should replace <project-name> with the name of your project.

If that is not the case, please double check to make sure that you are checking Gemfile.lock into GitHub and it is available during the build.

i.e.

run ls -al during the build and look for the Gemfile.lock file.


#3

Hi,

I was hiding the project name.

Gemfile.lock is checked in to version control, is available during the build and in the location referenced in the build file.


#4

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.