Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

For Rails, why does it matter that the Gem Devise is Rack-based?

As far as I know, Rack just sits in between Rails and the Webserver (like Mongrel or Webrick), to act as an "adapter" so that the choice of webserver is not important.

So why does Devise is known to be Rack-based and it is good? If Rack is transparent, doesn't it not matter whether the authentication system is Rack based or non-Rack based? (or how does it relate to Rack at all?)

like image 554
nonopolarity Avatar asked Dec 14 '25 13:12

nonopolarity


1 Answers

It just means that the gem does not depend on a particular implementation (such as Rails) of the Rack interface, just that it conforms to it. This is good because you can use the gem with other Rack-based frameworks such as Sinatra.

like image 126
dteoh Avatar answered Dec 18 '25 05:12

dteoh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!