Rails 5 Capistrano资产

Gle*_*sky 3 capistrano ruby-on-rails

我正在使用Rails 5 API Only应用程序。当我尝试部署此应用程序时出现错误

Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@xxx.xxx.xxx: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
Don't know how to build task 'assets:precompile' (see --tasks)
/home/deploy/applications/myrento/shared/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `load'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
Run Code Online (Sandbox Code Playgroud)

如何关闭deploy:assets:precompile任务?

这是我的Capfile

require "capistrano/setup" 
require "capistrano/deploy" 
require "capistrano/rbenv" 
require "capistrano" 
require "capistrano/rails" 
require "capistrano/bundler" 
require "capistrano/postgresql" 
require "capistrano/puma" 
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
Run Code Online (Sandbox Code Playgroud)

dp7*_*dp7 5

要删除资产编辑,您可以删除以下内容:

require "capistrano/rails"
Run Code Online (Sandbox Code Playgroud)

然后添加

require 'capistrano/rails/migrations'
Run Code Online (Sandbox Code Playgroud)