Spring and middleware conflict?

后端 未结 5 1920
余生分开走
余生分开走 2020-12-18 08:11

I\'m trying to add oauth2 with Google, following these instructions.

I\'m receiving the following error message starting the server:

Exiting
You\'ve          


        
相关标签:
5条回答
  • 2020-12-18 08:39

    I had a similar issue after code upgrade to new rails version, and the following comment helped me resolve it:

    https://github.com/rails/spring/issues/610#issuecomment-578188439

    Basically, disable spring loader in bin/rails stub, then run rails s until all the code issues are found and fixed, finally, enable spring back.

    0 讨论(0)
  • 2020-12-18 08:43

    Check config/initializers/omniauth.rb file and ensure that you have following content:

    Rails.application.config.middleware.use OmniAuth::Builder do
      provider :google, 'Client_Id', 'Client_Secret'
    end
    

    ensure that you exactly have the google provider (not github or facebook)

    0 讨论(0)
  • 2020-12-18 08:44

    Putting my comment as answer, because OP confirmed that it did help him. Follow the steps below to install the new Spring and resolve the issue:

    • run this bin/spring binstub --remove --all
    • remove the gem from Gemfile and run bundle install.
    • Now add the gem "spring", group: :development in Gemfile, run bundle install and bundle exec spring binstub --all following doc. Now all should be fine.
    0 讨论(0)
  • 2020-12-18 08:45

    This is what worked for me -

    I ran this on console - rake rails:update:bin

    then I ran bundle exec spring binstub --all

    I don't guarantee that this would work for all.

    Thanks :)

    0 讨论(0)
  • 2020-12-18 08:48

    First of all I am not Ruby On Rails Expert, so correct me if I am doing anything wrong with the below steps.

    The steps worked for me are below,

    from MacOS Terminal run the following..

    bin/spring binstub --remove --all

    ** Remove Your Cache folder under Vender (use Finder)

    bundle install.

    rails assets:precompile

    0 讨论(0)
提交回复
热议问题