2

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?

Samir Sabri
  • 937
  • 3
  • 11
  • 26
simo
  • 23,342
  • 38
  • 121
  • 218

3 Answers3

0

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.

  • No, I am not specifying custom location, I've tried again, and now I get this error: Deployment failed due to Failed to deploy the code to the server during "cap deploy" – simo Mar 17 '15 at 03:55
  • I have rm -rf assets folder, and re-deployed, then deployment passed! so do I have to delete shared/assets on the server before deploy? I think this is not recommended, because if deployment failed after that for any reason, the assets would not be there.. right? – simo Mar 17 '15 at 04:00
  • Are you using digests to create unique file names for your assets? You shouldn't have to delete the folder between deployments - but this depends on how your application runs its pipeline. – Philip Kallberg Mar 18 '15 at 10:24
0

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.

0

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.

Arpit Agarwal
  • 517
  • 1
  • 5
  • 17