rake aborted! ArgumentError: same file:

北城以北 提交于 2019-12-24 02:47:04

问题


When I try to deploy my rails app at cloud66, I get this error:

rake aborted!
ArgumentError: same file: /var/deploy/website/web_head/releases/20150315170454/public/assets/tinymce/custom_content.css and /var/deploy/website/web_head/releases/20150315170454/public/assets/tinymce/custom_content.css


Tasks: TOP => assets:precompile

Can someone please explain why I get this error? how to solve it?


回答1:


How are you running your asset pre-compilation? By default, your assets will go to shared/assets on the server - are you specifying a custom location? The location is defined by config.assets.prefix.




回答2:


Never had this problem but I can see two possible causes.

First : the file is effectively required twice either directly or by different tree directives.

Second : you have a partial _custom_content and a file custom_content. Sass does not accept this configuration.

I would do a rake assets:precompile on my local machine to try to understand.




回答3:


I was facing the same problem, below steps solved it:

gem 'tinymce-rails-imageupload', github: 'PerfectlyNormal/tinymce-rails-imageupload'

Then run,

bundle install

Now check with below command:

rake assets:precompile 

If the above command runs successfully with no error then it will create an assets folder in public/assets path. Delete the assets folder from 'public/assets' path.

Then git commit,push and then push to heroku. If you get the same error then add the below gem and restart again from the top.

gem "non-stupid-digest-assets"

Hope it's helpful.



来源:https://stackoverflow.com/questions/29063613/rake-aborted-argumenterror-same-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!