Project

General

Profile

Removing CKeditor plugin, and "rich" dependancy

Added by Justin A over 10 years ago

I'm having trouble with CKeditor and the ability to "paste" images into content. Using CKeditr, pasting an image that's in the client's paste buffer simply just doesn't work. (documented_here). But I'd like to have a nicer editor than Textile. So...

I Found the new WYSIWYG_plugin, which is based on CKeditor, so I'd like to try it, and see if it doesn't break pasting images. The problem I having is that I can't (1) install it with CKeditor also installed because it want's to take the namespace "ckeditor" (see #1 below), and (2) I can't seem to uninstall CKeditor without breaking my Redmine server. (see #2 below)

If I manage to get CKeditor uninstalled, then with plugins/redmine_ckeditor removed, and plugins/redmine_wysiwyg unpacked, I get the missing "rich" error upon rake (#3 below)

Ok, try to install rich with # gem install rich (see #4 below). Fail. try bundle install again. Fail.

Now it's just a pissing match between me and this huge ruby app, with no predictability, no confidence that this is a solid platform to support, etc. Sigh.

I've made 10+ attempts to uninstall CKeditor, but everytime I break my Redmine server (I've backed-up my server, and i have to restore it everytime, only to re-corrupt it again).

Can anyone tell me:
A) How to uninstall CKeditor and fix the "rich" dependance? ...and...
B) How to change the namespace of the WYSIWYG plugin so it uses a different namespace?

Thanks

#1

root@redmine redmine/plugins# bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Fetching gem metadata from https://rubygems.org/..
Fetching gem metadata from https://rubygems.org/..
Fetching gem metadata from http://rubygems.org/..
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.1)
Installing RedCloth (3.0.4)
Using i18n (0.6.9)
Using multi_json (1.9.2)
Using activesupport (3.2.17)
Using builder (3.0.0)
Using activemodel (3.2.17)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.2.2)
Using actionpack (3.2.17)
Using mime-types (1.25.1)
Using polyglot (0.3.4)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (3.2.17)
Using arel (3.0.3)
Using tzinfo (0.3.39)
Using activerecord (3.2.17)
Using activeresource (3.2.17)
Using bundler (1.3.5)
Using rack-ssl (1.3.4)
Using json (1.8.1)
Using rdoc (3.12.2)
Using thor (0.19.1)
Using railties (3.2.17)
Using rails (3.2.17)
Using acts-as-taggable-on (2.4.1)
Using awesome_nested_set (2.1.6)
Using climate_control (0.0.3)
Using cocaine (0.5.4)
Using coderay (1.1.0)
Using mini_portile (0.5.3)
Using nokogiri (1.6.1)
Using uuidtools (2.1.4)
Using dav4rack (0.2.11)
Installing execjs (2.2.1)
Using htmlentities (4.3.1)
Using jquery-rails (2.0.3)
Using kaminari (0.15.1)
Installing libv8 (3.11.8.17)
Using mysql2 (0.3.15)
Using net-ldap (0.3.1)
Using paperclip (3.5.4)
Using ruby-openid (2.3.0)
Using rack-openid (1.4.2)
Using rack-raw-upload (1.1.1)
Using redcarpet (2.3.0)
Using redmine_acts_as_taggable_on (1.0.0)
Using ref (1.0.5)
Using sass (3.3.5)
Using sass-rails (3.2.6)
Using rich (1.4.6)
Using rmagick (2.13.2)
Using rubyzip (1.1.3)
Using simple_enum (1.6.8)
Installing therubyracer (0.11.4)
Using xapian-full-alaveteli (1.2.9.5)
Using ya2yaml (0.31)
Using zip-zip (0.3)
Your bundle is complete!
Gems in the groups development and test were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
root@redmine redmine/plugins# rake redmine:plugins:migrate RAILS_ENV=production
(in /var/www/redmine)
rake aborted!
format name 'CKEditor' is already taken
/var/www/redmine/lib/redmine/wiki_formatting.rb:33:in `register'
/var/www/redmine/lib/redmine/plugin.rb:344:in `wiki_format_provider'
/var/www/redmine/plugins/redmine_wysiwyg/init.rb:18:in `block in <top (required)>'
/var/www/redmine/lib/redmine/plugin.rb:73:in `instance_eval'
/var/www/redmine/lib/redmine/plugin.rb:73:in `register'
/var/www/redmine/plugins/redmine_wysiwyg/init.rb:9:in `<top (required)>'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/www/redmine/lib/redmine/plugin.rb:133:in `block in load'
/var/www/redmine/lib/redmine/plugin.rb:124:in `each'
/var/www/redmine/lib/redmine/plugin.rb:124:in `load'
/var/www/redmine/config/initializers/30-redmine.rb:19:in `<top (required)>'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:103:in `require_environment!'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

#2

root@redmine redmine/plugins# rake db:migrate:plugin NAME=redmine_ckeditor VERSION=0 RAILS_ENV=production
(in /var/www/redmine)
Migrating redmine_ckeditor (Redmine CKEditor plugin)...
==  RefactorImageToFile: reverting ============================================
-- remove_column("rich_rich_files", :simplified_type)
   -> 0.0337s
-- rename_column("rich_rich_files", :rich_file_updated_at, :image_updated_at)
   -> 0.0546s
-- rename_column("rich_rich_files", :rich_file_file_size, :image_file_size)
   -> 0.0129s
-- rename_column("rich_rich_files", :rich_file_content_type, :image_content_type)
   -> 0.0114s
-- rename_column("rich_rich_files", :rich_file_file_name, :image_file_name)
   -> 0.0100s
-- rename_table("rich_rich_files", "rich_rich_images")
   -> 0.0012s
==  RefactorImageToFile: reverted (0.1263s) ===================================

==  AddUriCacheToRichImage: reverting =========================================
-- remove_column("rich_rich_images", :uri_cache)
   -> 0.0088s
==  AddUriCacheToRichImage: reverted (0.0094s) ================================

==  CreateRichRichImages: reverting ===========================================
-- drop_table("rich_rich_images")
   -> 0.0029s
==  CreateRichRichImages: reverted (0.0033s) ==================================

Note: The rake task db:migrate:plugin has been deprecated, please use the replacement version redmine:plugins:migrate
root@redmine redmine/plugins#
root@redmine redmine/plugins#
root@redmine redmine/plugins# rake redmine:plugins:migrate NAME=redmine_ckeditor VERSION=0 RAILS_ENV=production
(in /var/www/redmine)
Migrating redmine_ckeditor (Redmine CKEditor plugin)...
root@redmine redmine/plugins#

------ Then, in web browser... --------
Web application could not be started

cannot load such file -- rich (LoadError)
  /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
  /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
  /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
  /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
  /var/www/redmine/config/initializers/rich.rb:1:in `<top (required)>'
  /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
  /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
  /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
  /var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
  /var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
  /var/www/redmine/config/environment.rb:14:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /var/lib/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /var/lib/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:105:in `eval'
  /var/lib/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:105:in `preload_app'
  /var/lib/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:150:in `<module:App>'
  /var/lib/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /var/lib/gems/1.9.1/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:28:in `<main>'

#3

root@redmine redmine/plugins# rake redmine:plugins:migrate RAILS_ENV=production
(in /var/www/redmine)
rake aborted!
cannot load such file -- rich
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/www/redmine/config/initializers/rich.rb:1:in `<top (required)>'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
/var/www/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:103:in `require_environment!'
/var/lib/gems/1.9.1/gems/railties-3.2.17/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

#4

root@redmine redmine/plugins# gem install rich
Fetching: tzinfo-1.2.1.gem (100%)
Fetching: minitest-5.4.0.gem (100%)
Fetching: activesupport-4.1.4.gem (100%)
Fetching: actionview-4.1.4.gem (100%)
Fetching: actionpack-4.1.4.gem (100%)
Fetching: activemodel-4.1.4.gem (100%)
Fetching: arel-5.0.1.20140414130214.gem (100%)
Fetching: activerecord-4.1.4.gem (100%)
Fetching: actionmailer-4.1.4.gem (100%)
Fetching: railties-4.1.4.gem (100%)
Successfully installed tzinfo-1.2.1
Successfully installed minitest-5.4.0
Successfully installed activesupport-4.1.4
Successfully installed actionview-4.1.4
Successfully installed actionpack-4.1.4
Successfully installed activemodel-4.1.4
Successfully installed arel-5.0.1.20140414130214
Successfully installed activerecord-4.1.4
Successfully installed actionmailer-4.1.4
Successfully installed railties-4.1.4
10 gems installed
Installing ri documentation for tzinfo-1.2.1...
Building YARD (yri) index for tzinfo-1.2.1...
Installing ri documentation for minitest-5.4.0...
Building YARD (yri) index for minitest-5.4.0...
Installing ri documentation for activesupport-4.1.4...
Building YARD (yri) index for activesupport-4.1.4...
Installing ri documentation for actionview-4.1.4...
Building YARD (yri) index for actionview-4.1.4...
Installing ri documentation for actionpack-4.1.4...
Building YARD (yri) index for actionpack-4.1.4...
Installing ri documentation for activemodel-4.1.4...
Building YARD (yri) index for activemodel-4.1.4...
Installing ri documentation for arel-5.0.1.20140414130214...
Building YARD (yri) index for arel-5.0.1.20140414130214...
Installing ri documentation for activerecord-4.1.4...
Building YARD (yri) index for activerecord-4.1.4...
Installing ri documentation for actionmailer-4.1.4...
Building YARD (yri) index for actionmailer-4.1.4...
Installing ri documentation for railties-4.1.4...
Building YARD (yri) index for railties-4.1.4...
Installing RDoc documentation for tzinfo-1.2.1...
Installing RDoc documentation for minitest-5.4.0...
Installing RDoc documentation for activesupport-4.1.4...
Installing RDoc documentation for actionview-4.1.4...
Installing RDoc documentation for actionpack-4.1.4...
Installing RDoc documentation for activemodel-4.1.4...
Installing RDoc documentation for arel-5.0.1.20140414130214...
Installing RDoc documentation for activerecord-4.1.4...
Installing RDoc documentation for actionmailer-4.1.4...
Installing RDoc documentation for railties-4.1.4...

root@redmine redmine/plugins# rake redmine:plugins:migrate RAILS_ENV=production
(in /var/www/redmine)
rake aborted!
cannot load such file -- rich
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/1.9.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
...