Uptime Monitoring and Alerts
Installing Rails 3.2.13
Rails 4 is out now, and installs by default. You might need to install Rails 3 for a project. This is how you do it.
gem install --version '3.2.13' rails
POW RVM ZSH
I’m using a Rails 3 app, and my colleague updated the RVM config to use Ruby 2.0.0. I was having issues getting POW to work with the app. I’m using ZSH as my shell also.
The following command resolved my issue.
rvm env . -- --env > .powenv
Props to Linus on StackOverflow for this solution.
Devise_For with Skip
I just stumbled upon the options for devise_for which let you auto-generate the routes that are needed for a certain devise resource (user), with certain categories of routes skipped.
For example, if I want to define routes for my User, I can define:
This results in the routes for these three categories:
- Sessions - Sign in, Sign out
- Passwords - Password reset options
- Registrations - Creating new user, updating existing user, or destroying your user account
You can leave one of these categories out of the route definition by using skip. For instance if you want only the Sign-in and Sign-out options, you could define this in your routes.rb file:
devise_for :users, :skip => [:registrations, :passwords]
Project / Task Management Applications
I’ve worked on various projects that used various task management applications hosted in the cloud (software as a service). I hear about new ones every so often, so I decided to note them here for future reference.
- Pivotal Tracker - Anyone trying to adopt the agile / scrum method of development has likely used this.
- BaseCampHQ.com - This is the first Rails application. The reason Ruby on Rails exists. Simple and elegant.
- Wrike.com - Very flexible. Can be used to multiple people, in different organizations, matching any special hierarchy of tasks.
Refinery Extension Not Named After Model
A project I’m working on currently relies on Refinery CMS to administrate the pages. Instead of building our own separate admin area for our own custom models, we’re continuing to use Refinery for our non-page models as well.
Refinery and it’s extensions are generated under their own namespace to ensure that they play nice with any system you install Refinery into. It can provide page management inside of an existing Rails app you have, or it can act as the center of the entire website. I’m pretty sure the main concept is that it leaves the view/layout presentation up to you, but provides the page administration back-end for you.
Splitting a Branch with Git
There are times that a task you are working on results in an extremely huge amount of changes. Although you may have been careful, and tested each modification out well, there is always a possibility that something will cause an issue in production. If your branch contains modifications that can be released in separately, without interdependencies, it’s a good idea to split the feature branch into separate releases.
First you’ll want to interactively rebase your branch, squash all commits into a single commit, and then amend the remaining commit so that it’s the most recent.
git checkout my_feature_branch git fetch git rebase -i origin/master git commit --amend --reset-author
Everytime I setup a new Rails application I have to go through the configuration and change many things. It’s as if there is a specific configuration that I prefer. For instance, I like using the Twitter Bootstrap framework for my front-end…at least just to get started. I like to use Rspec and Cucumber for testing. The list goes on.
I just stumbled upon this argument that the ‘rails’ executable provides when generating a new Rails application.
If I were to pick one area of advice for any aspiring business men seeking their Master of Business Administration degree, with the intent of working for a company that involves developers, I recommend that you explore this concept. If you’re unaware of this possibility, your project might eventually end up drastically behind.
Why Ruby Was Named After a Gemstone
Matz: Ruby is named after the precious gemstone, it’s not an abbreviation of anything. When I started the language project, I was joking with a friend that the project must be code-named after a gemstone’s name (àla Perl). So my friend came up with “ruby”. It’s a short name for a beautiful and highly valued stone. So I picked up that name, and it eventually became the official name of the language.
Taken from An Interview with the Creator of Ruby by Bruce Stewart