jakeg / heroku-buildpack-bun

Heroku buildpack for Bun.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails app still can't deploy during assets:precompile

joemsak opened this issue · comments

Tried to upgrade to cssbundling-rails 1.3.3 or 1.4.0 which support bun, and deploy to heroku with this buildpack

(Same deal with jsbundling-rails 1.1.2 -> 1.2.2, 1.3.0 due to similar bun support added)

-----> https://github.com/jakeg/heroku-buildpack-bun app detected
#=#=#                                                                         bun was installed successfully to /tmp/build_b164eac6/.heroku/bin/bun 
Manually add the directory to ~/.bash_profile (or similar):
  export BUN_INSTALL="/tmp/build_b164eac6/.heroku" 
  export PATH=$BUN_INSTALL/bin:$PATH 
To get started, run: 
  bun --help 
Installing dependencies...
[0.04ms] ".env.production"
bun install v1.1.12 (43f0913c)
+ eslint@9.4.0
...
+ tailwindcss@2.2.19
579 packages installed [2.21s]
Blocked 1 postinstall. Run `bun pm untrusted` for details.
-----> Ruby app detected
-----> Installing bundler 2.5.6`
...
-----> Installing node-v20.9.0-linux-x64
-----> Installing yarn-v1.22.19
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       I, [2024-06-05T14:06:00.286037 #3047]  INFO -- ddtrace: [ddtrace] DATADOG CONFIGURATION - CORE - {"date":"2024-06-05T14:06:00Z","os_name":"x86_64-pc-linux","version":"1.23.0","lang":"ruby","lang_version":"3.3.2","env":"staging","service":"rake","dd_version":null,"debug":false,"tags":"env:staging","runtime_metrics_enabled":false,"vm":"ruby-3.3.2","health_metrics_enabled":false,"profiling_enabled":false}
       [dotenv] Loaded .env.production
       [dotenv] Loaded .env.staging
       [dotenv] Loaded .env.production
       rake aborted!
       cssbundling-rails: Command install failed, ensure bun is installed
       /tmp/build_b164eac6/vendor/bundle/ruby/3.3.0/gems/cssbundling-rails-1.4.0/lib/tasks/cssbundling/build.rake:6:in `block (2 levels) in <main>'
       /tmp/build_b164eac6/vendor/bundle/ruby/3.3.0/gems/ddtrace-1.23.0/lib/datadog/tracing/contrib/rake/instrumentation.rb:30:in `execute'
       Tasks: TOP => assets:precompile => css:build => css:install

The failing line in cssbundling-rails https://github.com/rails/cssbundling-rails/blob/e650c9ab135504cc2f8b8405c41cdebad5ede66f/lib/tasks/cssbundling/build.rake#L26

I downgraded back to 1.2.0 and removed the buildpack, and my deploys are building again.

Here is our buildpack list now (after removing bun; it had been listed before node's)

Screenshot 2024-06-05 at 08-17-50 · Settings Heroku

@joemsak can you confirm if this is still a bug?