HomeНаука и техникаRelated VideosMore From: Codemy School

Rails API: Setting up Devise Authentication - [004]

135 ratings | 18676 views
#RUBYONRAILS #API #DEVISE In this episode we show you how to setup devise authentication that we will use with our API. Rails API Series: https://www.codemy.net/sets/rails-api
Html code for embedding videos on your blog
Text Comments (16)
Raghav Sharma (5 months ago)
hey had an issue while running this command "rails g devise:install ". Shows me this error " /Users/admin1/.rvm/gems/ruby-2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/stack.rb:37:in `build': undefined method `new' for "Rack::Cors":String Did you mean? next (NoMethodError) . "
Raghav Sharma (5 months ago)
@Codemy School Yeah i did look back and figured the problem it was in configuration of rock cors. Thanks it worked
Codemy School (5 months ago)
@Raghav Sharma Yeah something is wrong in your setup / code. causing an error with Rack::Cors I'm unable to re-produce this, as I mentioned I tried generating a new project. Look at how you are configuring Cors in your project. Uploading code to GitHub might help.
Raghav Sharma (5 months ago)
Probably this might help i ran 'rails middleware' still showed the same error . rails aborted! NoMethodError: undefined method `new' for "Rack::Cors":String Did you mean? next
Codemy School (5 months ago)
@Raghav Sharma I just generated a new project with rack cors and devise gem, with this code example. https://www.codemy.net/posts/rails-api-setting-up-cors-003/sets/rails-api everything seems to work, so there is something wrong with your setup / code causing the problem.
Raghav Sharma (5 months ago)
@Codemy SchoolIt did not solve the problem.
Vlad Nicu (8 months ago)
Thanks for the tutorial! When you finish to type something please wait a second or two so that we can pause the video. I always need to go back so that I can see the command. Thanks again, great tutorial!
Gaurav Sobti (1 year ago)
Thank you for the tutorial. Which text editor are you using? Can you also do a tutorial on test driven development with an example of Rails 5 api?
Dominic Christoph (1 year ago)
He's using VSCode.
Codemy School (1 year ago)
We have an episode on that you can check out. https://www.codemy.net/posts/rails-api-automated-functional-test-part-1-022
Patrick Cyiza (1 year ago)
wow u got a beard (last series i follow was solidus ) lol
Codemy School (1 year ago)
haha yeah wait till you see the latest episodes! :)
Rabin Poudyal (2 years ago)
Hi ! This is great tutorial.. devise vs devise_token_auth what condition should i use one of these? :)
Codemy School (2 years ago)
+Rabin Poudyal use both devise is the authentication library, and devise_token_auth is for building token based authentication for your API. If you don't have an API you don't need token auth.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.