heroku / heroku/heroku-buildpack-ruby

ruby required for compiling webpack assets in rails build, missing from nodejs buildpack and stack 22

Open
#1,433 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
785
Forks
1.8k
Avg merge
1d 9h
Merged PRs (30d)
8

Description

I'm not sure whether to open this here or under the nodejs buildpack but the removal of system ruby from Heroku Stack 22 is causing issues.

I'm in the middle of upgrading our Rails app from 6 to 7, and from Ruby 2.7 to 3.3. Part of this has meant a switch to jsbundling-rails, propshaft, and webpack 5. We use the rails-erb-loader, specifically for generating rails route helpers in JS.

rails-erb-loader requires ruby (or rails runner) to run. I have the nodejs buildpack listed before ruby in the Heroku config (so I can specify node version) and because of this when Yarn runs the compile step, ruby is missing. This causes the compile to fail

```
remote: /usr/bin/env: ‘ruby’: No such file or directory
```

For now I'll be downgrading to stack 20 but I don't see a way to fix this. It would be nice if we could just reinstall system ruby on stack 22.

/edit

actually, that's not going to work either - because system ruby on stack 20 is 2.7. So yeah... this is a real pickle for us :/

Contributor guide

No contributing guide indexed for this repository

Research direction

The report involves the Node.js buildpack, Ruby buildpack ordering, Heroku Stack 22, Yarn's compile step, and rails-erb-loader; no repository file or test is named. Start by reproducing the `/usr/bin/env ruby` failure during asset compilation with the stated Rails, Ruby, and Node setup. Done means the supported build configuration or buildpack behavior allows this compile step to find the required Ruby.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, rails, ruby, webpack
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.