ckeditor 1.0.20 - Ubuntu 14.04 - rich/files_helper error
Added by David Mann over 9 years ago
Hello together,
First of all some details:
Environment: Redmine version 2.4.2.stable Ruby version 1.9.3-p484 (2013-11-22) [x86_64-linux] Rails version 3.2.21 Environment production Database adapter Mysql2 SCM: Subversion 1.8.8 Bazaar 2.7.0 Git 1.9.1 Filesystem Redmine plugins: projects_tree_view 0.0.8 redmine_ckeditor 1.0.20 redmine_custom_js 0.1.0
root@Ubuntu14PM:/usr/share/redmine# bundle exec gem env RubyGems Environment: - RUBYGEMS VERSION: 2.4.6 - RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-linux] - INSTALLATION DIRECTORY: /var/lib/gems/1.9.1 - RUBY EXECUTABLE: /usr/bin/ruby1.9.1 - EXECUTABLE DIRECTORY: /usr/local/bin - SPEC CACHE DIRECTORY: /root/.gem/specs - SYSTEM CONFIGURATION DIRECTORY: /etc - RUBYGEMS PLATFORMS: - ruby - x86_64-linux - GEM PATHS: - /var/lib/gems/1.9.1 - /root/.gem/ruby/1.9.1 - /usr/share/rubygems-integration/1.9.1 - /usr/share/rubygems-integration/all - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - https://rubygems.org/ - SHELL PATH: - /var/lib/gems/1.9.1/bin - /usr/local/sbin - /usr/local/bin - /usr/sbin - /usr/bin - /sbin - /bin - /usr/games - /usr/local/games
This is a normal apt-get install redmine installation with mysql.
It was not easy to install the CKEditor - but now I can see the editor. I copied a lot of files into the new
/usr/share/redmine/public/plugin_assets/redmine_ckeditor
diretory and changed some settings, like the database.yml to the adapter mysql2.
After that I was able to see the editor.
Now I have the problem that I cannot upload any images. The log is showing the following error:
Started GET "/redmine/rich/files/?CKEditor=issue_description&CKEditorFuncNum=2&default_style=original&allowed_styles=thumb%2Crich_thumb%2Coriginal&insert_many=false&type=image&scoped=true&scope_type=Project&scope_id=102&viewMode=grid" for 10.100.102.27 at 2015-04-20 15:26:12 +0200 Processing by Rich::FilesController#index as HTML Parameters: {"CKEditor"=>"issue_description", "CKEditorFuncNum"=>"2", "default_style"=>"original", "allowed_styles"=>"thumb,rich_thumb,original", "insert_many"=>"false", "type"=>"image", "scoped"=>"true", "scope_type"=>"Project", "scope_id"=>"102", "viewMode"=>"grid"} Current user: admin (id=1) Completed 500 Internal Server Error in 10.9ms ActiveRecord::StatementInvalid (Mysql2::Error: Table 'redmine_default.rich_rich_files' doesn't exist: SHOW FULL FIELDS FROM `rich_rich_files`): activerecord (3.2.21) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query' activerecord (3.2.21) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute' activerecord (3.2.21) lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log' activesupport (3.2.21) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activerecord (3.2.21) lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' activerecord (3.2.21) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `execute' activerecord (3.2.21) lib/active_record/connection_adapters/mysql2_adapter.rb:213:in `execute' activerecord (3.2.21) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:259:in `execute_and_free' activerecord (3.2.21) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:426:in `columns' activerecord (3.2.21) lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize' activerecord (3.2.21) lib/active_record/model_schema.rb:229:in `yield' activerecord (3.2.21) lib/active_record/model_schema.rb:229:in `default' activerecord (3.2.21) lib/active_record/model_schema.rb:229:in `columns' activerecord (3.2.21) lib/active_record/model_schema.rb:244:in `column_defaults' activerecord (3.2.21) lib/active_record/base.rb:482:in `initialize' rich (1.4.6) app/controllers/rich/files_controller.rb:26:in `new' rich (1.4.6) app/controllers/rich/files_controller.rb:26:in `index' actionpack (3.2.21) lib/action_controller/metal/implicit_render.rb:4:in `send_action' actionpack (3.2.21) lib/abstract_controller/base.rb:167:in `process_action' actionpack (3.2.21) lib/action_controller/metal/rendering.rb:10:in `process_action' actionpack (3.2.21) lib/abstract_controller/callbacks.rb:18:in `block in process_action' activesupport (3.2.21) lib/active_support/callbacks.rb:480:in `_run__923020102100371338__process_action__2289882618434537950__callbacks' activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.21) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' activesupport (3.2.21) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.2.21) lib/abstract_controller/callbacks.rb:17:in `process_action' actionpack (3.2.21) lib/action_controller/metal/rescue.rb:29:in `process_action' actionpack (3.2.21) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' activesupport (3.2.21) lib/active_support/notifications.rb:123:in `block in instrument' activesupport (3.2.21) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (3.2.21) lib/active_support/notifications.rb:123:in `instrument' actionpack (3.2.21) lib/action_controller/metal/instrumentation.rb:29:in `process_action' actionpack (3.2.21) lib/action_controller/metal/params_wrapper.rb:207:in `process_action' activerecord (3.2.21) lib/active_record/railties/controller_runtime.rb:18:in `process_action' actionpack (3.2.21) lib/abstract_controller/base.rb:121:in `process' actionpack (3.2.21) lib/abstract_controller/rendering.rb:45:in `process' actionpack (3.2.21) lib/action_controller/metal.rb:203:in `dispatch' actionpack (3.2.21) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' actionpack (3.2.21) lib/action_controller/metal.rb:246:in `block in action' actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:73:in `call' actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:73:in `dispatch' actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:36:in `call' journey (1.0.4) lib/journey/router.rb:68:in `block in call' journey (1.0.4) lib/journey/router.rb:56:in `each' journey (1.0.4) lib/journey/router.rb:56:in `call' actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:608:in `call' railties (3.2.21) lib/rails/engine.rb:484:in `call' railties (3.2.21) lib/rails/railtie/configurable.rb:30:in `method_missing' journey (1.0.4) lib/journey/router.rb:68:in `block in call' journey (1.0.4) lib/journey/router.rb:56:in `each' journey (1.0.4) lib/journey/router.rb:56:in `call' actionpack (3.2.21) lib/action_dispatch/routing/route_set.rb:608:in `call' rack-raw-upload (1.1.1) lib/rack/raw_upload.rb:18:in `call' /usr/lib/ruby/vendor_ruby/rack/openid.rb:98:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' rack (1.4.5) lib/rack/etag.rb:23:in `call' rack (1.4.5) lib/rack/conditionalget.rb:25:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/head.rb:14:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/params_parser.rb:21:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/flash.rb:242:in `call' rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context' rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/cookies.rb:341:in `call' activerecord (3.2.21) lib/active_record/query_cache.rb:64:in `call' activerecord (3.2.21) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `_run__4485566133131249770__call__3653908733111994057__callbacks' activesupport (3.2.21) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.21) lib/active_support/callbacks.rb:385:in `_run_call_callbacks' activesupport (3.2.21) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.2.21) lib/action_dispatch/middleware/callbacks.rb:27:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/remote_ip.rb:31:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.21) lib/rails/rack/logger.rb:32:in `call_app' railties (3.2.21) lib/rails/rack/logger.rb:16:in `block in call' activesupport (3.2.21) lib/active_support/tagged_logging.rb:22:in `tagged' railties (3.2.21) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.5) lib/rack/methodoverride.rb:21:in `call' rack (1.4.5) lib/rack/runtime.rb:17:in `call' activesupport (3.2.21) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.5) lib/rack/lock.rb:15:in `call' actionpack (3.2.21) lib/action_dispatch/middleware/static.rb:83:in `call' rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward' rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch' rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup' rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!' rack-cache (1.2) lib/rack/cache/context.rb:51:in `call' railties (3.2.21) lib/rails/engine.rb:484:in `call' railties (3.2.21) lib/rails/application.rb:231:in `call' railties (3.2.21) lib/rails/railtie/configurable.rb:30:in `method_missing' /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:142:in `accept_and_process_next_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:in `block (3 levels) in start_threads'
After that I thought that the plugin is still not correct installed.
I run rake db:migrate RAILS_ENV="production" again - but the following error is coming:
root@Ubuntu14PM:/usr/share/redmine# rake db:migrate RAILS_ENV="production" rake aborted! LoadError: No such file to load -- rich/files_helper /usr/share/redmine/plugins/redmine_ckeditor/lib/redmine_ckeditor/rich_files_helper_patch.rb:1:in `<top (required)>' /usr/share/redmine/plugins/redmine_ckeditor/lib/redmine_ckeditor.rb:128:in `apply_patch' /usr/share/redmine/plugins/redmine_ckeditor/init.rb:5:in `block in <top (required)>' /usr/share/redmine/config/environment.rb:14:in `<top (required)>' Tasks: TOP => db:migrate => environment (See full trace by running task with --trace)
I searched for all error messages, without any success. I don't know why it is not working.
I think some database tables are not created because of the "rich" error.
I would appreciate if someone may help me!
Thanks a lot and best regards
Roman
FYI: I don't have a lot of knowledge - that is why I am already happy that the CKEditor is almost working ;-)
Replies (4)
RE: ckeditor 1.0.20 - Ubuntu 14.04 - rich/files_helper error - Added by Leonel Iturralde over 9 years ago
Hi,
That error
LoadError: No such file to load -- rich/files_helper
means that file does not exist or has permissions problems.
-----------------------
btw How did you install the plugin? Did you follow this guide https://github.com/a-ono/redmine_ckeditor/tree/1.0.20 ?
RE: ckeditor 1.0.20 - Ubuntu 14.04 - rich/files_helper error - Added by David Mann over 9 years ago
Hi Leonel,
Thanks for your help!
Yes, that is correct. I followed the guide.
The error was always coming that is why I checked the log files. During my checks I saw that the Plugin is missing files in the directory /public/plugin_assets/redmine_ckeditor/.
Because of that error I copied the plugin folder into the directory.
After that i was able to see the new CKEditor - the editor is working, too - but I cannot upload any pictures.
But my biggest problem is that I would not be able to install any further plugins - as long as the CKEditor is not correct installed. I am always getting this error message because of rich/files_helper.
Do you have another idea?
Thanks a lot for your help and best regards
David
RE: ckeditor 1.0.20 - Ubuntu 14.04 - rich/files_helper error - Added by Leonel Iturralde over 9 years ago
When you ran rake redmine:plugins:migrate RAILS_ENV=production it should have copied all the necesary files to public/plugins_assets .
Try running again bundle exec rake redmine:plugins:migrate RAILS_ENV=production.
If that doesn't work try bundle exec redmine:plugins:assets RAILS_ENV=production.
RE: ckeditor 1.0.20 - Ubuntu 14.04 - rich/files_helper error - Added by David Mann over 9 years ago
You just made my day!
Thank you so much for your help!
I thought I tried the command "bundle exec rake redmine:plugins:migrate RAILS_ENV=production" at least 100 times... but now it was working! Maybe I used a different command ;)
Suddenly the databases were created and now the upload function is working, too.
Before that I tried to find out if the database.yml connection might contain a problem... but without any success.
Once again, thank you very much!
Best regards
David