# Noob help with setting up ruby bundler caching

**URL:** <https://travis-ci.community/t/noob-help-with-setting-up-ruby-bundler-caching/7444>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [March 4, 2020, 6:52am UTC](https://travis-ci.community/t/noob-help-with-setting-up-ruby-bundler-caching/7444 "2020-03-04T06:52:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevdogg](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/kevdogg/32/3955_2.png) [@kevdogg](https://travis-ci.community/u/kevdogg)\
**Post date:** [March 4, 2020, 6:52am UTC](https://travis-ci.community/t/noob-help-with-setting-up-ruby-bundler-caching/7444/1 "2020-03-04T06:52:45Z")

</div>

Hi  
I’m really new to travis CI and stumbled across this wonderful tool trying to build github pages.

I’m struggling through things but making slow progress.

My Github is setup to serve files from the /docs subdirectory. Within the /docs subdirectory I have the \_config.yml file, Gemfile and Gemfile.lock.

Within the root directory of the repository I have the .travis.yml file.

I’m requiring the use of Bundler2 and I’ve read the documentation how to install this at build time.

The problem I’m having is bundle is build everytime despite the \_travis.yml file asking the builder to cache Bundler.

I’m getting the following message:  
bundler caching is configured but a Gemfile is not found. Caching may not work.

Here is my \_travis.yml file:

```
language: ruby
cache: bundler
before_install:
  - cd docs
  - gem install bundler
#before_script:
# - cd docs
rvm:
  - 2.5.3
script:
  - bundle exec jekyll build

branches:
  only:
  - /.*/
deploy:
  provider: pages
  skip-cleanup: true
  repo: <user>/Site-Documentation
  github_token: $GITHUB_TOKEN
  target_branch: master
  on:
    branch: master

```

I suspect the error related to no Gemfile found is because there is no Gemfile within the root directory. How do I work around this error so bundler can be cached?

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [March 4, 2020, 11:39am UTC](https://travis-ci.community/t/noob-help-with-setting-up-ruby-bundler-caching/7444/2 "2020-03-04T11:39:04Z")

</div>

Hello @kevdogg,

I’m glad you like Travis CI, and first and foremost welcome to the community!

So onto the problem, to give me a scope of the issue at hand can you remove `cache: bundler` from your `.travis.yml` then retrigger the build?

If possible can you please include a relevant log URL.

-Montana (Travis CI Staff)
