i am getting this error when i am using omniauth, devise with rails 3.1.3.I have installed the omniauth gem & omniauth facebook.
Configured the routes.rb as match '/auth/:provider/callback',to: 'authentications#create'
asper the guide https://github.com/intridea/omniauth
Whenever i browse the url http://localhost:3003/auth/facebook/, i am finding routing error
**No route matches [GET] "/auth/facebook"**
Please help on this.I have the related post in stackoverflow, and none seems to get worked
I had the same problem when using Rails 3.2, OmniAuth 1.0.2 and Devise 2.0.
Apparently there is a problem with the 'path_prefix'. But when manually reconfigured everything works.
Try do this in your initializer:
Rails.application.config.middleware.use OmniAuth::Builder do
configure do |config|
config.path_prefix = '/auth'
end
...
end
I had the same problem and found out that it was caused by :omniauthable devise module. You will need to comment out the module, for example:
#app/model/user.rb
def User
...
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable#, :omniauthable
...
end
Sorry for the late response.
After some hours trying to fix this issue I realized that i'd config/initializers/omniauth.rb
in the .gitignore
file (shame on me).
so remove omniauth.rb from the .gitignore list if you haven't already
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With