Notes From a Full Stack Developer
on Rails, Sucker Punch, Background Jobs, Sidekiq, Resque, ActiveJob, Gem Consideration

ActiveJob and background jobs gem consideraton

In the post Use background jobs with single process, I have mentioned to the ActiveJob at the end of post. In this post, I will introduce and explain more detailed about this new feature of Rails 4.2 as well as an overview of popular background job gems. What is
Read More
on Rails, Foreman, Procfile

Tired with starting many things? Try Foreman now!

Nowadays, almost Rails applications have more than a web process (start with rails s). They often contain a web process (rails s) and some background processes (Delayed Job, Resque...). So far so good, this helps us to improve application performance or UX. But, how can we start our application, assume
Read More
on Rails, Sucker Punch, Heroku, Background Jobs

Run background jobs with single process

As we already know (almost?) that we should use background jobs to process long tasks (or even not so long task but can be processed later) to improve performance and user experience, a very common example is sending email. We often use some gems like: Delayed Job, Sidekiq, Resque... So
Read More
on Rails, ActiveRecord, Hidden Attributes

Hidden Model Attributes

Sometimes we have some attributes of model that should not to be available for client (via json format, javascript variables...), such as: password, login count, secret token... When we do render json: @visitor, Rails will return to client like this: { id: 1, secret_token: "iHj-Psm45Ymge-7kZNyx", name: "Test
Read More
on Rails 4.2, Rails, Rails Server, Rails 4.2 Remote Access

Make Rails 4.2 server listens to all interfaces

After upgrading Rails to 4.2, you cannot access the development mode rails server from another computer/virtual machine (remote access) for testing. So, why can this happen and how to resolve it? Reason This is caused by a change in Rails 4.2, the rails s command no longer
Read More