Question

App Platform Ruby Buildpack v1.244.3 error about no Gemfile.lock

I’m trying to deploy a Jekyll app on App Engine. However, even though I have a Gemfile committed in the repo, it gives this error:

[2023-08-15 05:49:42] ╭──────────── git repo clone ───────────╼
[2023-08-15 05:49:42] │  › fetching app source code
[2023-08-15 05:49:43] │ => Selecting branch "master"
[2023-08-15 05:49:44] │ => Checking out commit "8bbf222a736f486bf36c68d59f1c66361886477a"
[2023-08-15 05:49:44] │ 
[2023-08-15 05:49:44] │  ✔ cloned repo to /workspace
[2023-08-15 05:49:45] ╰────────────────────────────────────────╼
[2023-08-15 05:49:45] 
[2023-08-15 05:49:45]  › configuring custom build command to be run at the end of the build:
[2023-08-15 05:49:45]    │ bundle; bundle exec jekyll build
[2023-08-15 05:49:45] 
[2023-08-15 05:49:45] ╭──────────── buildpack detection ───────────╼
[2023-08-15 05:49:45] │  › using Ubuntu 18.04 stack
[2023-08-15 05:49:47] │ Detected the following buildpacks suitable to build your app:
[2023-08-15 05:49:47] │ 
[2023-08-15 05:49:47] │    heroku/ruby                  v1.244.3  (Ruby)
[2023-08-15 05:49:47] │    digitalocean/ruby-appdetect  v0.0.3    
[2023-08-15 05:49:47] │    digitalocean/procfile        v0.0.4    (Procfile)
[2023-08-15 05:49:47] │    digitalocean/custom          v0.1.2    (Custom Build Command)
[2023-08-15 05:49:47] │ 
[2023-08-15 05:49:47] │ For documentation on the buildpacks used to build your app, please see:
[2023-08-15 05:49:47] │ 
[2023-08-15 05:49:47] │    Ruby  v1.244.3  https://do.co/apps-buildpack-ruby
[2023-08-15 05:49:47] ╰─────────────────────────────────────────────╼
[2023-08-15 05:49:47] 
[2023-08-15 05:49:47] ╭──────────── app build ───────────╼
[2023-08-15 05:49:49] │ -----> Compiling Ruby/NoLockfile
[2023-08-15 05:49:49] │ 
[2023-08-15 05:49:49] │  !
[2023-08-15 05:49:49] │  !     No such file or directory @ rb_sysopen - ./Gemfile.lock
[2023-08-15 05:49:49] │  !
[2023-08-15 05:49:49] │ /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/helpers/bundler_wrapper.rb:200:in `read': No such file or directory @ rb_sysopen - ./Gemfile.lock (Errno::ENOENT)
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/helpers/bundler_wrapper.rb:200:in `read'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/helpers/bundler_wrapper.rb:200:in `major_bundler_version'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/helpers/bundler_wrapper.rb:213:in `detect_bundler_version_and_dir_name!'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/helpers/bundler_wrapper.rb:76:in `initialize'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/ruby.rb:32:in `new'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/ruby.rb:32:in `bundler'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/ruby.rb:36:in `bundler'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/ruby.rb:248:in `ruby_version'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/ruby.rb:230:in `slug_vendor_ruby'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/ruby.rb:123:in `build'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/bin/support/ruby_build:25:in `block in <main>'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/lib/language_pack/base.rb:175:in `log'
[2023-08-15 05:49:49] │         from /cnb/buildpacks/heroku_ruby/1.244.3/bin/support/ruby_build:24:in `<main>'
[2023-08-15 05:49:49] │ ERROR: failed to build: exit status 1
[2023-08-15 05:49:49] │ 
[2023-08-15 05:49:49] │ 
[2023-08-15 05:49:49] │ For documentation on the buildpacks used to build your app, please see:
[2023-08-15 05:49:49] │ 
[2023-08-15 05:49:49] │    Ruby  v1.244.3  https://do.co/apps-buildpack-ruby
[2023-08-15 05:49:49] │ 
[2023-08-15 05:49:49] │  ✘ build failed
[]

My repo is public at joshingyou/jekyll-lens: A Jekyll theme for photographers and photo bloggers. 📸 (github.com)

The custom build command I used is bundle; bundle exec jekyll build


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
August 21, 2023

Hi there!

I just forked your repository and tried to deploy it without making any changes and it worked out of the box:

✔  build complete 

Did you make any changes to your fork of this project?

Also, how does your build command look like? For me, this worked out of the box by using the default settings from the App Platform and deploying the project as a static site:

bundle exec jekyll build -d ./public

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel