jekuno / milia

Easy multi-tenanting for Rails5 (or Rails4) + Devise
MIT License
341 stars 72 forks source link

Milia gem installation problem #78

Closed sparky369 closed 7 years ago

sparky369 commented 7 years ago

I'm using rails in windows. After creating a new rails app I include gem 'devise' and gem 'milia' in gemfile.

then run bundle install

In app/controllers/application_controller.rb add the following line immediately after protect_from_forgery: before_action :authenticate_tenant!

I Run the following commands:

rails g milia:install --org_email='do-not-reply@example.com'

but it is not working. What can i do? plz help. It's urgent.

jekuno commented 7 years ago

Please provide detailed information what isn't working.

Did you follow all steps precisely as described in https://github.com/jekuno/milia#sample-app?

sparky369 commented 7 years ago

First, i created my rails app. Then after creating the app, i add to my Gemfile: gem 'milia' after that i run : bundle install

In app/controllers/application_controller.rb I add the following line immediately after protect_from_forgery: before_action :authenticate_tenant! which is given in screenshot. then i run

rails g milia:install --org_email='mail@your-provider.de' --skip_devise_generators=true

but it gives me the following error which is given in screenshot.

I don't understand what to do. plz help and give me step by step instruction. I m using rails in windows and my installer was railsinstaller 3.2.1.exe. plz help me.

On Sun, Jul 23, 2017 at 1:45 PM, jekuno notifications@github.com wrote:

Please provide detailed information what isn't working.

Did you follow all steps precisely as described in https://github.com/jekuno/milia#sample-app?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jekuno/milia/issues/78#issuecomment-317235591, or mute the thread https://github.com/notifications/unsubscribe-auth/Actc4w93xj2msqEXR1-v1qZEtTW3fhuwks5sQvoCgaJpZM4OgOty .

jekuno commented 7 years ago

Thanks for your answer. It looks as if you forgot to attach the screenshot showing the error?

sparky369 commented 7 years ago

no.. I uploaded the attachment correctly but don't know why it is not showing.

On Mon, Jul 24, 2017 at 5:41 PM, jekuno notifications@github.com wrote:

Thanks for your answer. It looks as if you forgot to attach the screenshot showing the error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jekuno/milia/issues/78#issuecomment-317396679, or mute the thread https://github.com/notifications/unsubscribe-auth/Actc4wQJAVXti8OVNdd6NhWV0eiqKdOlks5sRILpgaJpZM4OgOty .

sparky369 commented 7 years ago

however, here is the screenshot again.

On Mon, Jul 24, 2017 at 6:52 PM, Jamil ridoy hridoyjamil10@gmail.com wrote:

no.. I uploaded the attachment correctly but don't know why it is not showing.

On Mon, Jul 24, 2017 at 5:41 PM, jekuno notifications@github.com wrote:

Thanks for your answer. It looks as if you forgot to attach the screenshot showing the error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jekuno/milia/issues/78#issuecomment-317396679, or mute the thread https://github.com/notifications/unsubscribe-auth/Actc4wQJAVXti8OVNdd6NhWV0eiqKdOlks5sRILpgaJpZM4OgOty .

sparky369 commented 7 years ago

screenshot 33 screenshot 35 screenshot 37 screenshot 39

sparky369 commented 7 years ago

plz help me and provide direction as early as possible.

sparky369 commented 7 years ago

plz sir, it's very urgent. plz reply me and help to solve this problem as soon as possible.

jekuno commented 7 years ago

This gem is maintained in free time for free so 24/7 support unfortunately cannot always be granted. ;)

However it seems as if Devise is missing - could you please send me your Gemfile.lock?

sparky369 commented 7 years ago

thank u so much sir for your response. I understand 24/7 support is not possible always. i'm so sorry for my urgent help. however, here is the gemfile.lock . Plz sir help me to solve this problem.

sparky369 commented 7 years ago

(zip) gemfileLock.zip

jekuno commented 7 years ago

Your Gemfile.lock looks sane. I run an app with exactly the same rails, milia and devise gem versions without any problems.

Maybe you have some misconfiguration of autoload_paths or missing a line such as Bundler.require(*Rails.groups) in application.rb?

sparky369 commented 7 years ago

here is my screenshot for application.rb file.. screenshot 34

sparky369 commented 7 years ago

i'm new to rails.. plz give me some more direction what i should check to find out what the error could be..

jekuno commented 7 years ago

It seems as if it doesn't find Devise. You could try to add require 'devise' to the top of application.rb even though this usually shouldn't be needed.

sparky369 commented 7 years ago

i did this. but now it gives me this error... here is the screenshot...

sparky369 commented 7 years ago

screenshot 35 screenshot 36 screenshot 37 screenshot 38 screenshot 39 screenshot 40

sparky369 commented 7 years ago

I feel very helpless... this is not working correctly... Plz sir, give me all possible correction for which this error has occurred... should I update any configuration or something... plz sir help me...

jekuno commented 7 years ago

Please replace the milia line in your Gemfile with: gem 'milia', github: 'jekuno/milia', branch: 'issue#76' and run bundle install and then retry. This also includes a milia update which changes the before_filter syntax to before_action.

sparky369 commented 7 years ago

sir, I did this. but it now gives different error.. here is the screenshot...

sparky369 commented 7 years ago

screenshot 44

sparky369 commented 7 years ago

screenshot 41 screenshot 42 screenshot 43

jekuno commented 7 years ago

Unintialized constant Devise is the same error you already posted above. What does your application.rb look like now?

Btw it would be better if you just paste the sources instead of adding screenshots. Otherwise this thread cannot be indexed by search engines properly and you can't copy & paste text.

sparky369 commented 7 years ago

ok sir.. here is the zip file of my app..

sparky369 commented 7 years ago

sample_milia.zip

jekuno commented 7 years ago

I tested the app and running rails g milia:install --org_email='do-not-reply@example.com' worked out of the box. If you didn't use a rails template which runs the devise generators you may NOT add --skip_devise_generators=true of course.

I hope it works now as I cannot give any further support as of now.

sparky369 commented 7 years ago

Thank u so much sir for your support. At last, it works fine. I'm very grateful to you.

jekuno commented 7 years ago

:)

sparky369 commented 7 years ago

sorry sir for bothering you again. i replace the milia line in my Gemfile in another project with: gem 'milia', github: 'jekuno/milia', branch: 'issue#76 and run bundle install. but it gives me the following error.. here is the screenshot..

sparky369 commented 7 years ago

screenshot 46 screenshot 45

sparky369 commented 7 years ago

plz sir help me to solve this..

sparky369 commented 7 years ago

sir.. plz give me direction what to do?

sparky369 commented 7 years ago

plz sir, reply me... it's very urgent...