If you are using the Rolify gem to manage user roles in your Rails app, you may have sometimes encountered a problem which will prevent you from starting the Rails app if ever the database table for Rolify wasn’t present, even if cases when you don’t need Rolify or the database.… Continue reading “Rolify prevents a Rails app from starting”
Apple released OS X Yosemite to the public for free yesteday. So far, it isn’t bad. But, as a Web developer, I’ve hit a few bumps on the way, even during installation. Hopefully, if you’re a developer too, you’ll be wiser than me, do some research before installing, and maybe then this article will be of use to you.… Continue reading “OS X Yosemite: Fixes for developers”
… Continue reading “Ruby on Rails: Minify HTML, CSS, & JS, and compress with gzip”
Update (2015-08-21): Do not use this. You will hate me for saying this, as this page is one of my most popular on the site, but after using my code on this page with Rails for quite a while, I came back on my own decision to use it.
Nowadays, your Web app likely needs security and encryption with SSL. Once your SSL certificate and Web server are set up, one good way to ensure SSL is used is to redirect all HTTP traffic to HTTPS.
In the world of Ruby, I’ll explain how to do it for any application running with Rack or anything built with Ruby on Rails.… Continue reading “Rack & Ruby on Rails: Force SSL”
I mentioned how I prefer using environment variables to tailor the configuration of my Ruby on Rails app rather than going by the environment’s name. Here, I explain how I manage environment variables for a specify app using dotenv. (Figaro does a similar job – it’s mostly a matter of preference.)… Continue reading “Ruby on Rails: Manage local environment variables with dotenv”