我正在使用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)
如何关闭deploy:assets:预编译任务?
这是我的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 }
答案 0 :(得分:5)
要删除资产编辑,您可以将其删除:
require "capistrano/rails"
并添加,
require 'capistrano/rails/migrations'