solidusio-contrib / solidus_editor

:pencil: Adds support for WYSIWYG editors to Solidus
BSD 3-Clause "New" or "Revised" License
19 stars 33 forks source link

Error on migrate #17

Closed asecondwill closed 5 years ago

asecondwill commented 6 years ago

Getting an error running migrate after this

rails g ckeditor:install --orm=active_record --backend=paperclip

solid git:master ❯ rake db:migrate

Running via Spring preloader in process 7125
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

  class CreateCkeditorAssets < ActiveRecord::Migration[4.2]
/Users/will/Sites/rails/solid/db/migrate/20180219094135_create_ckeditor_assets.rb:1:in `<top (required)>'
-e:1:in `<main>'

Caused by:
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:

  class CreateCkeditorAssets < ActiveRecord::Migration[4.2]
/Users/will/Sites/rails/solid/db/migrate/20180219094135_create_ckeditor_assets.rb:1:in `<top (required)>'
-e:1:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

I'm just setting up a demo. rails 5.1.5

I have added to the bottom of the gem file:

gem 'solidus'
gem 'solidus_auth_devise'
gem 'deface'
gem 'solidus_wishlist', github: 'boomerdigital/solidus_wishlist', branch: 'master'
gem "solidus_blogging", github: "DigitalReflow/solidus-blogging"
gem 'solidus_static_content', github: 'solidusio-contrib/solidus_static_content'
gem 'solidus_editor', github: 'solidusio-contrib/solidus_editor', branch: 'master'
asecondwill commented 6 years ago

looking through the other migrations in this app, they tend to look like

class AddMetaTitleToPage < SolidusSupport::Migration[4.2] rather than

class CreateCkeditorAssets < ActiveRecord::Migration

asecondwill commented 6 years ago

corresponding issue at the ckeditor gem

https://github.com/galetahub/ckeditor/issues/775

asecondwill commented 6 years ago

and commit

https://github.com/galetahub/ckeditor/pull/776/files

asecondwill commented 6 years ago

obviously for now, can just edit generated migration, eg

class CreateCkeditorAssets < ActiveRecord::Migration[5.1]

to keep going.

Is selecting images previously uploaded only possible with ckeditor with this gem? or does that work with TinyMCE too?

kennyadsl commented 5 years ago

https://github.com/galetahub/ckeditor/pull/776 has been merged so we can close this one