简体   繁体   English

Capistrano部署旧资产

[英]Capistrano Deploying Old Assets

I'm fairly new in dealing with capistrano, learning on an inherited project. 在处理capistrano方面,我是一个新手,学习继承的项目。

I've done quite a few deployments on my staging server and never had a problem with the deployment dropping my CSS or JS changes in the compiled asset files. 我已经在我的登台服务器上完成了许多部署,并且从未遇到过将部署的CSS或JS更改删除到已编译资产文件中的问题。

I recently performed some major UI updates, upgrading gems for bootstrap, jquery, font awesome and others, along with major changes in my applicaiton CS and JS files. 我最近进行了一些主要的UI更新,升级了引导程序,jquery,真棒字体等的gem,以及我的应用程序CS和JS文件的重大更改。 When I deploy with capistrano on my staging server it ignores ALL of my asset changes and compiles the application JS and CSS files using old versions of the asset. 当我在暂存服务器上使用capistrano进行部署时,它将忽略我的所有资产更改,并使用该资产的旧版本编译应用程序JS和CSS文件。 It does actually create new files, it just uses old copies of everything. 它确实创建了新文件,只使用了所有内容的旧副本。 I don't see any errors when I deploy but it seems obvious that something's going wrong. 部署时我没有看到任何错误,但是显然出了点问题。

Everything works fine in development, of course, and if I run an assets:precompile locally I get all the updated CSS and JS files included. 当然,一切在开发中都可以正常进行,如果我在本地运行资产:预编译,我将获得所有更新的CSS和JS文件。

Any ideas? 有任何想法吗?

Got this resolved. 这个解决了。 It looks like there was a namespace collision in my deploy file (I had a :rake namespace to run some tasks) and the asset:precompile wasn't actually running. 看来我的部署文件中有一个名称空间冲突(我有一个:rake命名空间来运行一些任务),而asset:precompile实际上并未运行。 It's very annoying that it didn't crash, but instead failed silently. 并没有崩溃,而是无声地失败,这非常令人讨厌。

Before: 之前:

* executing "cd -- /.../releases/20140211172000 && RAILS_ENV=qa RAILS_GROUPS=assets #<Capistrano::Configuration::Namespaces::Namespace:0x00000001868638> assets:precompile"

After fixing namespace collision: 修复名称空间冲突后:

* executing "cd -- /.../releases/20140211173407 && RAILS_ENV=qa RAILS_GROUPS=assets bundle exec rake assets:precompile"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM