devise icon indicating copy to clipboard operation
devise copied to clipboard

Devise + sequel

Open dawidof opened this issue 2 years ago • 1 comments

Environment

  • Ruby [version] 3.2.2
  • Rails [version] 7.0.6
  • Devise [version] 4.9.2

Current behavior

rails generate devise user

<internal:/Users/dmytro/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- devise/orm/sequel (LoadError)
	from <internal:/Users/dmytro/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /Users/dmytro/.rvm/gems/ruby-3.2.2/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
	from /Users/dmytro/.rvm/gems/ruby-3.2.2/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:in `require'

Expected behavior

Any plans to connect devise with sequel??

dawidof avatar Jul 06 '23 15:07 dawidof

Your best chance is probably sequel-devise gem. However, that's just a hack, the gem just makes Sequel models quack enough like Active Record objects for Devise to work. Devise tried to be ORM-agnostic by using the orm_adapter gem, but in reality it still calls Active Record methods directly, bypassing the abstraction.

If you want an authentication framework built on top of Sequel, I highly recommend Rodauth. It has a Rails integration, which includes generators and other niceties.

janko avatar Aug 03 '23 22:08 janko

I don't know much about Sequel tbh, but would consider a patch to support it if the changes aren't much. For now, I've taken notes as a potential feature to support in the future.

carlosantoniodasilva avatar May 14 '24 19:05 carlosantoniodasilva