If you’ve been working on a common staging branch when you thought you were working on a personal feature branch, you can move your work by doing the following: git checkout feature_branch git cherry-pick SHA (Do this for each commit on the mistaken branch) git checkout staging git reset –hard HEAD~n (where n = the number of mistakenly committed commits) This assumes you haven’t already pushed your changes to a [...]
Read More
WordPress will throw a 404 not found error, with either a .html or .htm extension for permalink pages if a file of the same name can be found within the web root directory. So, for instance: * If you create a new wordpress page called ‘contact’, and * You create an HTML page called ‘contact.html’ within the root directory, then You will run into this 404 not found error when [...]
Read More
When using the select form builder method in rails, for instance: f.select In conjunction with the options_from_collection_for_select method, like f.select :field, options_from_collection_for_select(@fields, ‘id’, ‘name’) Remember, there is a fourth argument in the above method, which defines the selected value, like so f.select :field, options_from_collection_for_select(@fields, ‘id’, ‘name’, @object.field)
Read More
Ruby on Rails Scenario The easiest way to keep a Rails App from idling is to use New Relic Standard (free), in conjunction with their availability monitoring. You can do this in a couple of ways: Issue the following command with the Heroku Toolkit heroku addons:add newrelic:stark Or, login to your heroku account and provision the addon from there. Once the New Relic addon is provisioned, go to the new [...]
Read More
This post assumes you are processing background jobs on a development/production environment utilizing Redis and Resque. If you’re monitoring your local resque instance with resque-web, just run the following commands to change the resque-web’s redis reference to your production redis instance resque-web -K resque-web -r [your redis location] If you’re using RedisToGo, for instance, you can get the redis location by logging into your account.  If your account is through [...]
Read More
I wanted a simple way to push WordPress to Heroku.  It doesn’t get much simpler than this https://github.com/mhoofman/wordpress-heroku In regards to using your own custom domain name, the tutorial recommends using A records with a set of defined IP addresses.  Instead, I think the better approach is to use a CNAME record pointing to your Heroku App’s location.  You can find Heroku’s recommendation here: https://devcenter.heroku.com/articles/custom-domains#custom-subdomains Additionally, the tutorial doesn’t mention [...]
Read More