Hi there,
I’m new to deploying Rails apps in general, and after really struggling with AWS EB and skipping over Heroku, I’m giving Fly.io a try! It seems so much simpler than EB so far, thank goodness.
I’ve worked my way through a couple of errors, but I’m getting stuck at this one:
#24 3.005 rails aborted!
#24 3.005 Don't know how to build task 'assets:precompile' (See the list of available tasks with `rails --tasks`)
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task_manager.rb:59:in `[]'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:66:in `lookup_prerequisite'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:62:in `block in prerequisite_tasks'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:62:in `map'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:62:in `prerequisite_tasks'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/railties-7.0.4/lib/rails/command.rb:51:in `invoke'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#24 3.005 /app/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
#24 3.005 Tasks: TOP => fly:build
#24 3.005 (See full trace by running task with --trace)
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -o pipefail -c ${BUILD_COMMAND}]: exit code: 1
- I’ve looked through all of the rest of the similar “assets:precompile” errors in this forum and I don’t any of those threads are particularly relevant. I’m using Rails 7, NodeJS, React for my front end.
- I’m not building an API so I think it would be helpful to precompile.
- I got the starter Rails app to deploy correctly, so I don’t think it’s some overall problem with my computer.
- I just started trying to deploy today, and I haven’t reconfigured my Dockerfile, so it should be the same as the current automatic build, although I am using Node 16.17.1, Bundler 2.3.26, Yarn latest, Ruby 2.7.7
- I also tried giving it more memory, up to the Dedicated-CPU 2GB - no help
Really appreciate any tips or advice, thanks for the help!