Skip to content

Rails cannot write files to ./tmp with jammy full builder #889

Description

@benydc

When using Rails framework, the ActiveRecord needs to write caches or other files in the root project tmp folder (/workspace/tmp) but it fails with permission denied to write files to that folder. Rails Framework offers no config to change this to another tmp path, and some gem libraries for Rails have this hardcoded also.

Expected Behavior

CNB to write files in (/workspace/tmp)

Current Behavior

Access denied for CNB to write in /workspace/tmp
Example error message: Errno::EACCES · Permission denied @ dir_s_mkdir - /workspace/tmp/1670939080-843440521812643-0007-6864

Possible Solution

Allow writes to /workspace/tmp for CNB User/Rails Framework

Steps to Reproduce

  1. Setup rails project using https://guides.rubyonrails.org/getting_started.html
  2. Set default builder pack config default-builder paketobuildpacks/builder-jammy-full
  3. Root project we run pack build rails-paketo-jammy
  4. Run container docker run -e RAILS_MASTER_KEY="<master-key>" rails-paketo-jammy (master key value is at ./config/master.key)
  5. Observe that it fails to run puma with error: Permission denied @ rb_sysopen - tmp/pids/server.pid

Motivations

We have switched to Jammy because our backend requires a system library version that is not supported in Bionic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions