0
votes

I am trying to install active_storage with rails 5.2 and I am using sequel-rails gem instead of active record. I am getting following error while performing 'rails active_storage:install'

rake aborted! Don't know how to build task 'app:railties:install:migrations' (see --tasks) /home/edmodo/.rvm/gems/ruby-2.4.3/gems/railties-5.2.0/lib/rails/engine.rb:635:in block (4 levels) in <class:Engine>' /home/edmodo/.rvm/gems/ruby-2.4.3/gems/activestorage-5.2.0/lib/tasks/activestorage.rake:7:in block (2 levels) in ' /home/edmodo/.rvm/gems/ruby-2.4.3/gems/rake-12.3.1/exe/rake:27:in <top (required)>' /home/edmodo/.rvm/gems/ruby-2.4.3/bin/ruby_executable_hooks:24:in eval' /home/edmodo/.rvm/gems/ruby-2.4.3/bin/ruby_executable_hooks:24:in `' Tasks: TOP => active_storage:install:migrations

Can anyone help me to fix this issue?

1
how are you trying to install gem sequel-rails ?Vishal
Yes, I have installed sequel gem by adding 'gem sequel-rails' in Gemfile and then I am trying to run 'rails active_storage:install' command.Aditi
did you run bundle install ? did you find any error in bundle install ? please mention in question that you are getting this error when you performing ` rails active_storage:install` commandVishal
I have run bundle install and there is no error for this.Aditi

1 Answers

0
votes

As far as I know, you currently cannot use Active Storage with Sequel, since it has a hard dependency on Active Record classes.

https://github.com/rails/rails/blob/master/activestorage/app/models/active_storage/attachment.rb#L9

You need to use an alternate solution to Active Store, like Shrine or you need to use Active Record.