When you look at the logs of your application in development, they may appear clear and concise to you (probably not thou), but when you are looking at the production logs and there are many simultaneous requests, sometimes it is difficult to know exactly what like of the log is the next entry, or what…
Category: articles
3 simple words you can use to improve your ruby code: ‘redo’, ‘retry’ and ‘next’
As programmers we usually select our preferred tools, our preferred language, IDE, code editor, … For the last years, my favorite programming language is Ruby, not only because of Rails (but of course it has something to do with it), but because the language is powerful and flexible, and as such has many details that…
5 easy steps to implement JWT (Javascript Web Token) authentication for your API Only Rails apps
If you are writing an API only rails app, your clients will need to authenticate in some way to use your API, you have of course many options to choose from: You can build your own authentication You can Use a plugin like Devise You can use OAuth both accepting other provider or implementing your…
Background on Rails – why do you need to learn all the background job APIs?
Rails has a new library called ActiveJob, the idea of this library is to make it easier to create background jobs without worring about what library to use, and the specific API for each one, and even changing it if a better one comes out in the future without changing your application. ActiveJob will keep…
6 reasons to stop using REST and start using GraphQL
Following up the post about a Rails API only app, lets talk about why you should not use REST in your API app. 1: too much unneeded information Have you ever written a client application to any API? And when you did it, was there a query you needed to do that returned a lot…
API only app? use rails and be happy!
Sometimes we need to create only an API, an application without a user interface, for example if you’ll have someone else built later a mobile client for that API, or even a full SPA web client, there are many reasons to build an API only app. And since there are that many reasons, rails helps…
How to use docker to have an uniform development environment for your rails project
Lets say you work on a company, and there is more than one developer at the company, and sometimes other developer is hired and need to configure the development environment. Or maybe you work on an opensource project and you want to make the life of anyone that is contributing to the project easier. Or…
Quick and Dirty introduction to ActionCable – the best WebSockets for Rails!
This post is a followup and a translation of my presentation from “The Developers Conference Florianopolis 2018” What are WebSockets good for? Update the screen of many clients simultaneously when the database is updated Allow many users to edit the same resource at the same time Notify users that something happened Among many other things….
3 common problems of rails application deployments (or any platform really, these problems happens to everyone)
Rails is a really cool framework to work with, but it is not fall proof, and it will not prevent you from doing stupid things, having that said, even with the best tools available, putting a new software in production, or doing a significant upgrade to a software that is already in production is always…
WebPack on Rails! – the easiest way to use the new Javascript syntax on your rails apps with the newest frameworks
I had some rails projects that needed a better UI or a different feature in the UI, and there was the perfect javascript library, the problem was that it needed “require.js” and it is not really easy to integrate require.js in asset pipeline. The good news is that there is a webpack gem that will…