content top

Force Rails Version When Creating a New App

I have multiple versions of the Rails gem installed on my development server. We’ve been using Rails long enough now that we have many apps created for many versions. As I make changes to each app I need to test them in their specific version (the version listed in the environment.rb file) so having multiple Rails versions installed is a necessity. But if I try to spin up a new application using $rails new_app I get a rails app...

Read More

Titleize an Array List in Rails

First, a trick. If you want to display a comma separated list from an array all you need to do is multiply that array by a comma. “What’s that”, you say? You heard right. If you have an array in the variable @my_array you can simply place the following in your view: <%= @my_array * ", " %> The comma and space in your string will be added to the end of every string in your array except for the last one. Beautiful! I...

Read More

Rails Controller Variables not Loading

Don’t forget: “render :layout => …” should appear below any variables in your controller. I’ve spent a few hours trying to get the @variables set in my controller to show up in my layout. After much frustration and trying all kinds of fancy ways around my problem, it suddenly occurred to me that I was simply loading the layout before the variables; I was loading them in the wrong order! Grrr….. If you...

Read More

How I converted Mephisto to WordPress

I got a comment the other day asking how I converted to WordPress from Mephisto while keeping my comments and everything intact. If you are familiar with Ruby on Rails, this response will make sense. If you are not, I recommend learning it…then this response will make sense. In a nutshell, I used Mephisto for the conversion. First I spent about a week mapping Mephisto’s DB to WordPress’ DB. I went straight into the...

Read More

Mephisto to Typo migration?

This blog you are reading is powered by Mephisto. I originally created this blog using my own code in PHP and was so tired of re-inventing the wheel that I went out and researched what I thought would be the best blogging software for my needs. I’m in love with Ruby on Rails, so one of my requirements was that it had to be using that technology. In my research I narrowed it down to Typo and Mephisto, but there wasn’t much...

Read More
content top