David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said almost 7 years ago on Rails API - Authentication with JWT :

You might need to add 

skip_before_action :authenticate_user!

in the controller that is causing the error message. It may be in the user_token_controller.rb where you would need to add this.


David Kimura PRO said almost 7 years ago on Rails API - Authentication with JWT :

I'd recommend tracing it back to see where the :authenticate_user! is causing the application to fail.

If i'm stuck on an issue like this, I will sometimes put a debugger log in each controller action with the name of the action. Viewing the logs, you'd be able to see at which point (or the last point) it was able to make its way through before it returned the error. I'm definitely not suggesting to expose the app! That would be bad, but certain controllers need to have unauthenticated access so that it is able to perform the authentication. I'm a big fan of puts debugging. It's similar to rubber duck debugging.

Side note: if you're working on some kind of calculation that is rather difficult and you don't have the tests built yet or is a part of the app where tests will not be created, using a tail | grep can be very handy as well. So in the app, you might have something like

Rails.logger.info "DEBUG:: #{some var}" 

and in your console, do

tail -f log/development.log | grep DEBUG

David Kimura PRO said almost 7 years ago on Plotting Points on a Map from Scratch :

Check out episode 84 where the geocoding from street address to coordinates is done via the geocoder gem.


David Kimura PRO said almost 7 years ago on puma-dev replacement for pow and prax :

You should be able to tail the development logs. You should be able to go into your app directory and tail the logs

tail -f log/development.log

After you run the puma dev install, it should not stay in your terminal, it should redirect you back to the command prompt.


David Kimura PRO said almost 7 years ago on FullCalendar Events and Scheduling :

Sorry, I primarily focus on Ruby. However, check out their docs at https://fullcalendar.io/docs/ to see some of their examples that they have.