milia icon indicating copy to clipboard operation
milia copied to clipboard

Rails 6.0.1 undefined method `skip_before_filter' for Milia::RegistrationsController:Class

Open shawnpk opened this issue 5 years ago • 8 comments

I'm trying to get milia up and running on a Rails 6.0.1 app. I am getting the following error:

/.rvm/gems/ruby-2.6.5/gems/milia-0.3.30/app/controllers/registrations_controller.rb:5:in class:RegistrationsController': undefined method skip_before_filter' for Milia::RegistrationsController:Class

I know why the error is occuring, but how can I install milia in a Rails 6.0.1 app?

shawnpk avatar Nov 18 '19 20:11 shawnpk

Would also like to know if this has been solved.

ChaseFlorom avatar Dec 19 '19 19:12 ChaseFlorom

I'm getting the following output when trying to instal milia with Rails 6: `Bundler could not find compatible versions for gem "rails": In Gemfile: rails (~> 6.0, >= 6.0.2.1)

milia (~> 1.3, >= 1.3.1) was resolved to 1.3.1, which depends on
  rails (~> 5.0)`

Unfortunately, many of the gems I have for this project will not work with Rails 5. I too am looking for a resolution to this issue.

toddt67878 avatar Jan 17 '20 00:01 toddt67878

Milia became potato :-) I'm using this, activerecord-multi-tenant

emrahyildirim avatar Jan 22 '20 17:01 emrahyildirim

I believe Milia is not compatible with with Rails 6 at this time. When you try to add it in Rails 6 it adds version 0.3.0 but if you try to add the 1.3.1 you will get:

milia (~> 1.3.1) was resolved to 1.3.1, which depends on
      rails (~> 5.0)

albertski avatar Feb 22 '20 18:02 albertski

Anyone found a solution to get Emilia working with rails 6.0.2?

I am running the following command: rails g milia:install --org_email='[email protected]'

and getting the following error; undefined method `skip_before_filter' for Milia::RegistrationsController:Class (NoMethodError) Did you mean? skip_before_action

alamkamran avatar Apr 13 '20 06:04 alamkamran

Typo in the last comment. **Emilia => Milia :)

alamkamran avatar Apr 13 '20 06:04 alamkamran

Same you guys I stuck with Milia, I start now believing that this is the reason why Rails is now falling down & until the next year only few programmer will be left who represent to Rails

kashtech79 avatar May 06 '20 11:05 kashtech79

This works: Gemfile: gem 'milia', '~>1.3', :git => 'https://github.com/yshmarov/milia.git'

gem milia POST MORTEM

So, the gem has not been maintained by the "owner" for 3 years now. Pull requests are even reviewed.

Face it, Milia was never a good multi-tenanting gem. On the top of my head - too much magic in the installation, and anyways sessions is not the best way to track current_tenant. It can get "stuck" when logging in/out and switching tenants.

Unfortunately I fell for it some years ago and wasted dozens of hours as a consequence. I should have gone with something else.

Why milia? 95% of the popularity of this gem came from this amateur-level course on udemy

what now?

  1. A few users have forked the gem and customized it for their personal needs. You can check out the forks and find something interesting

  2. We don't need 5 gems that do the same thing. Better to put all effort into one gem that does the job well (think devise).

In case of multitenancy, we have 2 good options: https://github.com/ErwinM/acts_as_tenant - all tenants in one database https://github.com/influitive/apartment - separate database for each tenant

summary: don't rely on low-maintained third-party code, like gem milia

Not to underestimate the initial creator of the gem @dsaronin who was a legend.

yshmarov avatar May 16 '20 23:05 yshmarov