Although this might seem a common practice, you would be surprised how many times I come across projects that contain passwords and tokens. When connecting your application tot 3rd party services or even simpler than that, do you commit your production database settings in your repository ass well? Do all team member need access to … Continue reading Don’t commit sensitive data
Tag: ruby
If you’re like me, tailing your development log might provide you with some useful information. The thing I like the most is viewing the details of the queries that happen in the background while you are using your application. But one thing that makes it harder to keep a proper view on the data that … Continue reading Turn off asset logging in your Rails application
One of the great benefits of open source is that for some of the problems you encounter, someone probably already solved it for you. For a project I needed a simple way to parse an RSS feed. If you look around, you’ll find plenty of libraries that designed to tackle this problem. But taking a … Continue reading Parsing RSS feeds in ruby
“Release early, release often”, a philosophy that emphasizes the importance of early and frequent releases in creating a tight feedback loop. I’ve been trying to push my code to production as often as possible. But I’ve been having a problem with the asset pipeline. From the moment Capistrano hits the deploy:assets:precompile task, it might take … Continue reading Faster Capistrano deployments
In my earlier post, I covered the basics of creating a ruby gem. At the end, show the release rake task to tag, build and release your gem. But you might get an error when doing this: $ rake release my_gem 0.0.1 built to pkg/my_gem-0.0.1.gem. Tag v0.0.1 has been created. rake aborted! Your rubygems.org credentials … Continue reading Easily publish your ruby gems
Deployments are a critical phase in any software project. I can still remember the time where I needed to deploy code changes to production using nothing more than FTP to upload all the changed files. Oh boy, the elevated heart rate, logged in on the production server to intervene when something went wrong. From time … Continue reading Deployments automation with Capistrano
Creating a command-line app in ruby might be fun, being able to test them is just as important as testing any other web application. But you can do this with Aruba. Aruba is a Cucumber extension for testing command-line applications written in any language. Passing arguments, interacting with the file system, capturing exist codes en mimicking … Continue reading Testing your ruby command-line tools
In some cases you might need a simple command-line tool. But one of the problems writing those scripts is finding a descent way to manage and distribute them. One way is to bundle your command-line tool into a ruby gem. I already described in a previous post how to create a ruby gem, so I … Continue reading A simple Ruby command-line tool
There are different tools out there for creating gems. Back in the time, you could achieve this by using tools like Echoe or Jeweler. But you can do the same by using Bundler. Bundler is mostly use as a way of managing dependencies, but not a lot of people know you can use it to … Continue reading Create a ruby gem
I came across this quick tip on how to reduce the size of your Rails log files. Over time, the development and test log might get bigger and bigger. A quick solution is to rotate your logs through the Rails Logger: config.logger = Logger.new(Rails.root.join(“log”,Rails.env + “.log”), 3, 5*1024*1024) This will rotate your log files every … Continue reading Rails Logger