Search code examples
rubyruby-on-rails-5ckeditor5

rails generate ckeditor:install --orm=active_record --backend=active_storag not worked Rails 5


I want to use in my project ckeditor with active storage, but when I generate to install ckeditor using orm active record and active storage, it create an initializer but not create any migration file.

Running via Spring preloader in process 23128
  create  config/initializers/ckeditor.rb
   route  mount Ckeditor::Engine => '/ckeditor'
   Could not find "active_record/active_storage/ckeditor/asset.rb" in 
   any of your source paths. Your current source paths are: 
   /home/arif/Development/Test 
   Project/cable_test/lib/templates/ckeditor/install
   /home/arif/.rvm/gems/ruby-2.4.2/gems/ckeditor- 
   4.1.3/lib/generators/ckeditor/templates

Solution

  • So I ran into this as well, and after poking around the code I figured I'd just run the generator without the flags like the docs. If you run into this problem just run the generator with no flags rails g ckeditor:install. Also, you'll need to look at these files and make sure your models match.

    https://github.com/galetahub/ckeditor/tree/master/lib/generators/ckeditor/templates/active_record/active_storage/ckeditor

    EDIT: It looks like active_storage is only available on the master branch as of this post.