Error: Command 'fly:build' not recognized

Hi,
I’m trying to deploy a simple helpdesk application (helpyio) with Ruby 2.6.6, Rails 4.2.11.1, following the “Migrate from Heroku” guide.
But during the fly deploy process, I got an error:

=> [stage-3 6/7] RUN chmod +x /app/bin/* && sed -i ‘s/ruby.exe/ruby/’ /app/bin/* && sed -i ‘/^#!/aDir.chdir File.expand_path(“…”, dir)’ /app/bin/* 0.3s
=> ERROR [stage-3 7/7] RUN bin/rails fly:build
[stage-3 7/7] RUN bin/rails fly:build:
#20 0.633 Error: Command ‘fly:build’ not recognized

How is it possible? I have already removed any :development or :test gems.
I also tried to run "fly:release" command before, but then

Error: Command ‘fly:release’ not recognized

Any ideas?
Thank you!

Hey @Stefan :wave:

I had the same problem. The generated files are wrong when using bin/rails to run the rake tasks. The correct one would be bin/rake. So it is just a matter of changing it on the Dockerfile and fly.toml.

Good luck :slight_smile: