Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shawnpk opened this issue Nov 18, 2019 · 8 comments

Comments

@shawnpk
Copy link

shawnpk commented Nov 18, 2019

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?

@ChaseFlorom
Copy link

Would also like to know if this has been solved.

@toddt67878
Copy link

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.

@emrahyildirim
Copy link

emrahyildirim commented Jan 22, 2020

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

@albertski
Copy link

albertski commented Feb 22, 2020

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)

@alamkamran
Copy link

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
Copy link

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

@kashtech79
Copy link

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

@yshmarov
Copy link

yshmarov commented May 16, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants