PerfectlyNormal / tinymce-rails-imageupload

Image upload plugin for TinyMCE and Rails with the asset pipeline
MIT License
149 stars 153 forks source link

rake assets:precompile breaks in tinymce-rails-imageupload 3.5.8.5 and TinyMCE-rails 3.5.8.3 #44

Closed carljhoover closed 10 years ago

carljhoover commented 10 years ago

Gem versions:

tinymce-rails-imageupload 3.5.8.5 TinyMCE-rails 3.5.8.3

Asset settings in production.rb (in the event they are relevant):

config.serve_static_assets = false config.assets.css_compressor = :sass config.assets.compile = false config.assets.digest = true

I get the following error each time I attempt to run RAILS_ENV=production rake assets:precompile

Seems like the fix is as simple as passing the additional argument, but I wasn't sure if there was something else going on giving the assets being set on the above line.

Hope you have time to take a quick look! Thanks.

rake aborted! wrong number of arguments (2 for 3) /Users/carljhoover/.rvm/gems/ruby-1.9.3-p392/gems/tinymce-rails-3.5.8.3/lib/tinymce/rails/asset_installer.rb:6:in initialize' /Users/carljhoover/.rvm/gems/ruby-1.9.3-p392/gems/tinymce-rails-imageupload-3.5.8.5/lib/tasks/tinymce-uploadimage-assets.rake:13:innew' /Users/carljhoover/.rvm/gems/ruby-1.9.3-p392/gems/tinymce-rails-imageupload-3.5.8.5/lib/tasks/tinymce-uploadimage-assets.rake:13:in block in <top (required)>' /Users/carljhoover/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:ineval' /Users/carljhoover/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `' Tasks: TOP => assets:precompile (See full trace by running task with --trace)

RobertoPrieto commented 10 years ago

I have the same problem.

Thnx

PerfectlyNormal commented 10 years ago

Hi.

I haven't tried it, but does it work to remove line 12 TinyMCE::Rails::AssetInstaller::ASSETS = assets in lib/tasks/tinymce-uploadimage-assets.rake, and let the new line 12 be TinyMCE::Rails::AssetInstaller.new(assets, target, manifest).install?

carljhoover commented 10 years ago

Yes, that works. Sorry I haven't had time to do a pull request.

PerfectlyNormal commented 10 years ago

Just released v3.5.8.6. Hopefully that takes care of this problem. Sorry for the very long response time!

RobertoPrieto commented 10 years ago

Thanks!!!!

It Works great. Thanks for your quick reply.