Can't build rails app with buildpacks

Hi,

I am having issues with building my app with packeto builds, so I asked on the buildpack github here: mkdir /workspace/tmp/cache: permission denied · Issue #267 · paketo-buildpacks/rails-assets · GitHub

The error is basically mkdir /workspace/tmp/cache: permission denied

They are asking: do you happen to know how fly.io does the build? Does it use the pack CLI? I'm interested to know the version that's getting used for the build.

Could you please help? Thanks!

app = "lem"
kill_signal = "SIGINT"
kill_timeout = 5

[build]
  builder = "heroku/buildpacks:20"
  buildpacks = ["heroku/nodejs", "heroku/ruby"]

  [build.args]
    SECRET_KEY_BASE="asdf"

[deploy]
  release_command = "bundle exec rails db:migrate recurring:init"

[env]

[experimental]
  allowed_public_ports = []
  auto_rollback = true
  cmd = []
  entrypoint = []
  exec = []

[processes]
  app = "bundle exec puma -C config/puma.rb"
  worker = "bundle exec rails jobs:work"

[[services]]
  http_checks = []
  internal_port = 3000
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    force_https = true
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

Seeing similar with heroku buildpacks:

rake aborted!
       Errno::EACCES: Permission denied @ dir_s_mkdir - /workspace/tmp/cache
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/webpacker/compiler.rb:63:in `record_compilation_digest'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/webpacker/compiler.rb:28:in `block in compile'
       <internal:kernel>:90:in `tap'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/webpacker/compiler.rb:23:in `compile'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/webpacker/commands.rb:51:in `compile'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/webpacker.rb:35:in `compile'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/tasks/webpacker/compile.rake:23:in `block (4 levels) in <main>'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/webpacker.rb:28:in `ensure_log_goes_to_stdout'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/tasks/webpacker/compile.rake:22:in `block (3 levels) in <main>'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/webpacker.rb:20:in `with_node_env'
       /workspace/vendor/bundle/ruby/3.1.0/gems/webpacker-5.4.3/lib/tasks/webpacker/compile.rake:21:in `block (2 levels) in <main>'
       Tasks: TOP => assets:precompile => webpacker:compile
       (See full trace by running task with --trace)

Any ideas what Fly.io is doing differently with buildpacks? Good people at packeto tested my app and all works fine for them, so it must be something Fly.io specific :frowning:

Anyway, if anyone comes here with similar issue, I solved by migrating to Heroku.