galetahub / ckeditor

Ckeditor 4.x integration gem for rails
https://ckeditor.com/ckeditor-4/
MIT License
2.23k stars 877 forks source link

Image not uploading #769

Closed bevinh closed 5 years ago

bevinh commented 7 years ago

Hi - I saw a similar issue, and it appears that the pull request to update the master branch hasn't been accepted? I can't get the image upload to work using paperclip. Can someone help?

`Started POST "/ckeditor/pictures?CKEditor=page_pagetext&CKEditorFuncNum=1&langCode=en&authenticity_token=psrU%2BY6%2Bg0994Fm6kiyrkdftk%2F35MT50tH8rG3YZ17CnZctTVRPJ0revTd1cprMGIof0WToOwowpPwY3ML%2FFSQ%3D%3D" for 127.0.0.1 at 2017-07-11 18:08:15 -0400 Processing by Ckeditor::PicturesController#create as HTML Parameters: {"upload"=>#<ActionDispatch::Http::UploadedFile:0x007fcb6270d110 @tempfile=#<Tempfile:/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/RackMultipart20170711-87856-11h7l8h.JPG>, @original_filename="IMG_3153.JPG", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"upload\"; filename=\"IMG_3153.JPG\"\r\nContent-Type: image/jpeg\r\n">, "ckCsrfToken"=>"NMEiz0O7Sjd3GemIHAyY9qyA7tinYa48ECS5rWNT", "CKEditor"=>"page_pagetext", "CKEditorFuncNum"=>"1", "langCode"=>"en", "authenticity_token"=>"psrU+Y6+g0994Fm6kiyrkdftk/35MT50tH8rG3YZ17CnZctTVRPJ0revTd1cprMGIof0WToOwowpPwY3ML/FSQ=="} Command :: file -b --mime '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-14ng9w0.JPG' Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-1ekxxyf.JPG[0]' 2>/dev/null Command :: identify -format %m '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-1ekxxyf.JPG[0]' Command :: convert '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-1ekxxyf.JPG[0]' -auto-orient -resize "800>" '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/e9240f7fd953f8c5cf06419a6fcbd82220170711-87856-nwg5zc' Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-1ekxxyf.JPG[0]' 2>/dev/null Command :: identify -format %m '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-1ekxxyf.JPG[0]' Command :: convert '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-1ekxxyf.JPG[0]' -auto-orient -resize "118x" -crop "118x100+0+28" +repage '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/e9240f7fd953f8c5cf06419a6fcbd82220170711-87856-1t8vfj0' (0.2ms) BEGIN Command :: file -b --mime '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-1vjr0ud.JPG' Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/j2/_cqtq_hx6r98y74ylbkcj_540000gq/T/5c8a50f5ff8c39d8c1b4e76d8d8b2c7120170711-87856-1ekxxyf.JPG[0]' 2>/dev/null (0.3ms) ROLLBACK Completed 500 Internal Server Error in 2225ms (ActiveRecord: 4.7ms)

ArgumentError (wrong number of arguments (given 1, expected 0)):

activesupport (5.1.2) lib/active_support/core_ext/string/inflections.rb:181:in parameterize' ckeditor (4.2.2) lib/ckeditor/utils.rb:20:inparameterize_filename' ckeditor (4.2.2) lib/ckeditor/backend/paperclip.rb:33:in parameterize_filename' activesupport (5.1.2) lib/active_support/callbacks.rb:413:inblock in make_lambda' activesupport (5.1.2) lib/active_support/callbacks.rb:197:in block (2 levels) in halting' activesupport (5.1.2) lib/active_support/callbacks.rb:601:inblock (2 levels) in default_terminator' activesupport (5.1.2) lib/active_support/callbacks.rb:600:in catch' activesupport (5.1.2) lib/active_support/callbacks.rb:600:inblock in default_terminator' activesupport (5.1.2) lib/active_support/callbacks.rb:198:in block in halting' activesupport (5.1.2) lib/active_support/callbacks.rb:507:inblock in invoke_before' activesupport (5.1.2) lib/active_support/callbacks.rb:507:in each' activesupport (5.1.2) lib/active_support/callbacks.rb:507:ininvoke_before' activesupport (5.1.2) lib/active_support/callbacks.rb:130:in run_callbacks' activesupport (5.1.2) lib/active_support/callbacks.rb:825:in_run_create_callbacks' activerecord (5.1.2) lib/active_record/callbacks.rb:340:in _create_record' activerecord (5.1.2) lib/active_record/timestamp.rb:95:in_create_record' activerecord (5.1.2) lib/active_record/persistence.rb:563:in create_or_update' activerecord (5.1.2) lib/active_record/callbacks.rb:336:inblock in create_or_update' activesupport (5.1.2) lib/active_support/callbacks.rb:131:in run_callbacks' activesupport (5.1.2) lib/active_support/callbacks.rb:825:in_run_save_callbacks' activerecord (5.1.2) lib/active_record/callbacks.rb:336:in create_or_update' activerecord (5.1.2) lib/active_record/persistence.rb:129:insave' activerecord (5.1.2) lib/active_record/validations.rb:44:in save' activerecord (5.1.2) lib/active_record/attribute_methods/dirty.rb:35:insave' activerecord (5.1.2) lib/active_record/transactions.rb:308:in block (2 levels) in save' activerecord (5.1.2) lib/active_record/transactions.rb:384:inblock in with_transaction_returning_status' activerecord (5.1.2) lib/active_record/connection_adapters/abstract/database_statements.rb:225:in block in transaction' activerecord (5.1.2) lib/active_record/connection_adapters/abstract/transaction.rb:194:inblock in within_new_transaction' /Users/admin_bah34/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize' activerecord (5.1.2) lib/active_record/connection_adapters/abstract/transaction.rb:191:inwithin_new_transaction' activerecord (5.1.2) lib/active_record/connection_adapters/abstract/database_statements.rb:225:in transaction' activerecord (5.1.2) lib/active_record/transactions.rb:210:intransaction' activerecord (5.1.2) lib/active_record/transactions.rb:381:in with_transaction_returning_status' activerecord (5.1.2) lib/active_record/transactions.rb:308:inblock in save' activerecord (5.1.2) lib/active_record/transactions.rb:323:in rollback_active_record_state!' activerecord (5.1.2) lib/active_record/transactions.rb:307:insave' activerecord (5.1.2) lib/active_record/suppressor.rb:42:in save' ckeditor (4.2.2) app/controllers/ckeditor/application_controller.rb:13:inrespond_with_asset' ckeditor (4.2.2) app/controllers/ckeditor/pictures_controller.rb:15:in create' actionpack (5.1.2) lib/action_controller/metal/basic_implicit_render.rb:4:insend_action' actionpack (5.1.2) lib/abstract_controller/base.rb:186:in process_action' actionpack (5.1.2) lib/action_controller/metal/rendering.rb:30:inprocess_action' actionpack (5.1.2) lib/abstract_controller/callbacks.rb:20:in block in process_action' activesupport (5.1.2) lib/active_support/callbacks.rb:131:inrun_callbacks' actionpack (5.1.2) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (5.1.2) lib/action_controller/metal/rescue.rb:20:inprocess_action' actionpack (5.1.2) lib/action_controller/metal/instrumentation.rb:32:in block in process_action' activesupport (5.1.2) lib/active_support/notifications.rb:166:inblock in instrument' activesupport (5.1.2) lib/active_support/notifications/instrumenter.rb:21:in instrument

justinkuepper commented 6 years ago

For anyone else running into this issue, I have solved this issue by using the following versions in the Gemfile:

gem 'ckeditor', github: 'galetahub/ckeditor'
gem 'paperclip', '~> 5.0.0'
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.