Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Causes an error when deploy #170

Closed
hopewise opened this issue Mar 15, 2015 · 17 comments
Closed

Causes an error when deploy #170

hopewise opened this issue Mar 15, 2015 · 17 comments

Comments

@hopewise
Copy link

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

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

Tasks: TOP => assets:precompile

Can you please help me how to fix this issue?
Thanks

@hopewise
Copy link
Author

I have cleared the assets folder, but now I get this error:

rake aborted!
NoMethodError: undefined method each_key' for false:FalseClass /var/deploy/folder/web_head/shared/bundle/ruby/2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_manifest.rb:41:ineach'
/var/deploy/folder/web_head/shared/bundle/ruby/2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_installer.rb:26:in cleanup_assets' /var/deploy/folder/web_head/shared/bundle/ruby/2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_installer.rb:13:ininstall'
/var/deploy/folder/web_head/shared/bundle/ruby/2.2.0/gems/tinymce-rails-4.1.6/lib/tasks/tinymce-assets.rake:12:in `block in '
Tasks: TOP => assets:precompile

@spohlenz
Copy link
Owner

@hopewise: What version of Rails are you running (I'm guessing 3.x)? and what config.assets options do you have specified? After the compilation fails, is there a manifest file within public/assets?

@hopewise
Copy link
Author

I am running Rails 4.1.6, config.assets options:

config.assets.compress = true
config.assets.compile = true
config.assets.digest = true

After the compilation fails, the manifest file within public/assets is empty or not there ,,

@suratpyari
Copy link

I am getting the similar issue.

rake aborted!
NoMethodError: undefined method each_key' for nil:NilClass /Users/apple/.rvm/gems/ruby-2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_manifest.rb:97:ineach'
/Users/apple/.rvm/gems/ruby-2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_installer.rb:26:in cleanup_assets' /Users/apple/.rvm/gems/ruby-2.2.0/gems/tinymce-rails-4.1.6/lib/tinymce/rails/asset_installer.rb:13:ininstall'
/Users/apple/.rvm/gems/ruby-2.2.0/gems/tinymce-rails-4.1.6/lib/tasks/tinymce-assets.rake:12:in block in <top (required)>' /Users/apple/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:ineval'
/Users/apple/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `

'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

@prpetten
Copy link

+1 also getting this error.

@mtmail
Copy link

mtmail commented May 16, 2015

When I got this error the problem was that my project included a file called manifest

 cat app/assets/images/manifest.json
{
    "name": "name of my projectt",
    "icons": [
        {
            "src": "\/android-chrome-36x36.png",
            "sizes": "36x36",
            "type": "image\/png",
            "density": "0.75"
        },
        {
            "src": "\/android-chrome-48x48.png",
            "sizes": "48x48",
            "type": "image\/png",
              ...

tinymce/rails/asset_manifest.rb looks for the first manifest file it can find.

    def self.try(manifest_path)
      paths = Dir[File.join(manifest_path, "manifest*.json")]
      new(paths.first) if paths.any?
    end

I deleted my manifest file and it worked. The file got created by a favicon generator and I guess I accidentally checked it in.

@hopewise
Copy link
Author

@spohlenz I am still having this problem, the only way I get over it is to delete manifest file at public/assets before run "rake assets:precompile" , how to solve this issue please?

@spohlenz
Copy link
Owner

@hopewise Could I please get you to upload a GitHub repository with a sample app that demonstrates the issue? Then I should be able to get to the bottom of it.

@hopewise
Copy link
Author

I have deployed the app here: https://github.com/hopewise/tinymce-problem
I highly appreciate your time :)

@hopewise
Copy link
Author

Dear Sam, I've uploaded the same app to github so you can check the issue,
here https://github.com/hopewise/tinymce-problem
On Aug 15, 2015 7:31 AM, "Sam Pohlenz" notifications@github.com wrote:

@hopewise https://github.com/hopewise Could I please get you to upload
a GitHub repository with a sample app that demonstrates the issue? Then I
should be able to get to the bottom of it.


Reply to this email directly or view it on GitHub
#170 (comment)
.

@spohlenz
Copy link
Owner

@hopewise I am seeing your original reported error in your example app. However it is coming from the non-stupid-digest-assets gem.

@hopewise
Copy link
Author

so, what's the work around for this issue? what exact gem is that
?(non-stupid-digest-assets
gem)

On Sat, Aug 15, 2015 at 3:03 PM, Sam Pohlenz notifications@github.com
wrote:

@hopewise https://github.com/hopewise I am seeing your original
reported error in your example app. However it is coming from the
non-stupid-digest-assets gem.


Reply to this email directly or view it on GitHub
#170 (comment)
.

Kind Regards,

Samir Sabri
Software Architect& Developer
www.dcaclab.com
Jordan-Middle East

@spohlenz
Copy link
Owner

It looks like non-stupid-digest-assets is a dependency of alchemy_cms. However alchemy_cms appears to include its own version of TinyMCE, which isn't something I can work around in this gem.

@hopewise
Copy link
Author

So, is it possible to use alchemy_cms version of TinyMCE?
On Aug 16, 2015 6:11 AM, "Sam Pohlenz" notifications@github.com wrote:

It looks like non-stupid-digest-assets is a dependency of alchemy_cms.
However alchemy_cms appears to include its own version of TinyMCE, which
isn't something I can work around in this gem.


Reply to this email directly or view it on GitHub
#170 (comment)
.

@philipqnguyen
Copy link

Updating non-stupid-digest-assets to 1.0.5 seems to fix a similar problem for me. Give that a try =)

@EmilyMB
Copy link

EmilyMB commented Jul 26, 2017

Ran into this after upgrading then downgrading TinyMCE. The "solution" was to purge the cache (heroku repo:purge_cache -a appname) using the Heroku repo plugin since rake assets:clean and rake assets:clobber don't reliably work with the older versions of sprockets as discussed here.

@hopewise
Copy link
Author

hopewise commented Aug 2, 2017

Currently, I simply delete the folder of TinyMCE at public folder before compile assets, and it work fine..

@hopewise hopewise closed this as completed Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants