我想弄清楚为什么我会收到这个消息Sprockets::ArgumentError: link_tree argument must be a directory
。这是一个全新的Rails 7.0.5安装,配置了Tailwindcss(使用--css tailwind
选项),在开发环境中运行良好,但当我尝试使用Capistrano部署时,在Ubuntu 20.04服务器上预编译资产时失败。下面是控制台输出的相关部分:
00:26 deploy:assets:precompile
01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
01
01 Rebuilding...
01
01 Done in 1073ms.
01 rake aborted!
01 Sprockets::ArgumentError: link_tree argument must be a directory
01 /var/www/ai_demo/releases/20230524232929/app/assets/config/manifest.js:4
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/directive_processor.rb:407:…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/directive_processor.rb:359:…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/directive_processor.rb:189:…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/directive_processor.rb:187:…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/directive_processor.rb:187:…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/directive_processor.rb:84:i…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/directive_processor.rb:65:i…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:84:in `c…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:66:in `b…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:65:in `r…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:65:in `c…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:182:in `load_from…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:59:in `block in l…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:337:in `fetch_ass…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:43:in `load'
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/cached_environment.rb:44:in…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/cached_environment.rb:44:in…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/bundle.rb:27:in `call'
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:84:in `c…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:66:in `b…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:65:in `r…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/processor_utils.rb:65:in `c…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:182:in `load_from…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:59:in `block in l…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:337:in `fetch_ass…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/loader.rb:43:in `load'
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/cached_environment.rb:44:in…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/map.…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/cached_environment.rb:44:in…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/base.rb:81:in `find_asset'
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/base.rb:88:in `find_all_lin…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/manifest.rb:125:in `each'
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/manifest.rb:125:in `to_a'
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/sprockets-4.2.0/lib/sprockets/manifest.rb:125:in `block (…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/exec…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/sync…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/sync…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/sync…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/exec…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/prom…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/exec…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/exec…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/exec…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/exec…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/exec…
01 /var/www/ai_demo/shared/bundle/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/exec…
01 Tasks: TOP => assets:precompile
这是我的Rails环境:
Rails version 7.0.5
Ruby version ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin22]
RubyGems version 3.3.7
Rack version 2.2.7
Middleware ActionDispatch::HostAuthorization, Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, ActionDispatch::ServerTiming, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, ActionDispatch::RemoteIp, Sprockets::Rails::QuietAssets, Rails::Rack::Logger, ActionDispatch::ShowExceptions, WebConsole::Middleware, ActionDispatch::DebugExceptions, ActionDispatch::ActionableExceptions, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ContentSecurityPolicy::Middleware, ActionDispatch::PermissionsPolicy::Middleware, Rack::Head, Rack::ConditionalGet, Rack::ETag, Rack::TempfileReaper
Application root /Users/scervera/app_dev_local/rails_projects/AiDemo
Environment development
Database adapter postgresql
Database schema version 0
1条答案
按热度按时间f8rj6qna1#
我可以通过从/app/assets/config/manifest. js中的manifest.js文件中删除这一行来清 debugging 误
//= link_tree ../../../vendor/javascript .js
我还不确定这会如何影响我。
更新:我必须将这一行重新添加到tailwindcss_rails gem的javascript to函数中。有道理