Closed hopewise closed 6 years ago
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:in
each'
/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:in
install'
/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
@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?
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 ,,
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:in
each'
/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:in
install'
/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:in
eval'
/Users/apple/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `
+1 also getting this error.
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.
@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?
@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.
I have deployed the app here: https://github.com/hopewise/tinymce-problem I highly appreciate your time :)
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 https://github.com/spohlenz/tinymce-rails/issues/170#issuecomment-131293109 .
@hopewise I am seeing your original reported error in your example app. However it is coming from the non-stupid-digest-assets gem.
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 https://github.com/spohlenz/tinymce-rails/issues/170#issuecomment-131360710 .
Samir Sabri Software Architect& Developer www.dcaclab.com Jordan-Middle East
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.
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 https://github.com/spohlenz/tinymce-rails/issues/170#issuecomment-131484371 .
Updating non-stupid-digest-assets to 1.0.5 seems to fix a similar problem for me. Give that a try =)
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.
Currently, I simply delete the folder of TinyMCE at public folder before compile assets, and it work fine..
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