solidus
solidus copied to clipboard
"Deploy to Heroku" Fails
Discussed in https://github.com/solidusio/solidus/discussions/4501
Originally posted by Louvivien August 10, 2022
To Reproduce
- I go on the github and i click on the deploy app Heroku button
- it fails
Current behavior
Here is the log:
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Ruby,Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Installing bundler 2.3.10
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.7.1
-----> Installing dependencies using bundler 2.3.10
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
Your bundle only supports platforms ["x86_64-darwin-19"] but your local platform
is x86_64-linux. Add the current platform to the lockfile with
`bundle lock --add-platform x86_64-linux` and try again.
Bundler Output: Your bundle only supports platforms ["x86_64-darwin-19"] but your local platform
is x86_64-linux. Add the current platform to the lockfile with
`bundle lock --add-platform x86_64-linux` and try again.
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Expected behavior
Application deploys successfully.
I'm not sure how much value this button is for how often it breaks, but this should be as simple as adding the bundle lock --add-platform x86_64-linux
somewhere.
Sorry for @Louvivien for erroneously moving this to the troubleshooting board. I thought you were having an issue with your own deploy, didn't read carefully enough.
@jarednorman
I got this error when deploying with heroku.
how do you resolved it?
Bundle completed (147.58s)
Cleaning up the bundler cache.
-----> Installing node-v16.13.1-linux-x64
-----> Installing yarn-v1.22.17
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NoMethodError: undefined method `has_one_attached' for #<Class:0x000055fad4de2860>
Did you mean? has_attached_file
@PeterTakahashi That looks unrelated to this issue.
If you're having issues deploying your app to Heroku yourself, please start a separate discussion in our Troubleshooting section. If you're seeing a different issue with the "Deploy to Heroku" button in this project's README, then please open a new bug report for it.
For what it's worth, has_one_attached
is provided by ActiveStorage, so it looks like ActiveStorage isn't being loaded. By default, Solidus now uses ActiveStorage for storing images and things. Previously we used paperclip and you can still configure Solidus to use Paperclip if you want.
I think that we can remove the button now. Heroku won't allow free instances soon and no one will create a demo Solidus application on Heroku paying for it.
Closed with #4681, thanks @Naokimi