How to Automatically Link URLs in Rails

Let’s say you have a Rails app and you’d like any URLs in any plain text string to be automatically hyperlinked. Well, then you’ll need this: .gsub(/((http|https)://[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(([0-9]{1,5})?/.*)?)/, ‘<a href=’1′>1</a>’) For example: I blog at http://garrickvanburen.com Through: “I blog at http://garrickvanburen.com”.description.gsub(/((http|https)://[a-z0-9]+([-.]{1}[a-z0-9]+)*.[a-z]{2,5}(([0-9]{1,5})?/.*)?)/, ‘<a href=’1′>1</a>’) Results in: I blog at http://garrickvanburen.com

Ququoo.com: Twitter Timesheet Looking For Beta-Friends

Ququoo.com, my first Rails app is finally up and at a place where I’m happy with it. Ququoo turns Twitter into a timesheet – by grouping your tweets and measuring the time between them. As with any web app that was launched moments ago, there’s probably a few more things to tidy up and sort …

How To Deploy Rails with SVN and Capistrano to a Secondary Domain on TextDrive

I just deployed my first rails app to one of my secondary domains on TextDrive’s shared hosting space. If that sounds like a recipe for disaster….you’re right! While Rails is a great development tool, there’s lots of work to do in simplifying, stabilizing, and documenting the deployment process. The app in question is very, very …

Learning the Rails

I’m taking a week off of active programming to focus on better understanding 3 aspects of Rails development I’ve been wistfully ignoring: Migrations, Testing, and Deployment. There’s a tiny, fun little project I’m using as the venue for these subjects. One week from today (May 1) is what I’m giving myself on this effort. Any …

How To Install MacPorts, Apache2, Rails, MySql, Mongrel, and Subversion on an Intel Mac

Now that I’m just about ready to deploy my first rails app, I thought I’d get the deployment environment set up rock solid on both the production and the development machines (one Mac Mini and one MacBookPro). Like many other tutorials on this same subject, your mileage may vary. In fact I’m writing this now, …

SSHKeychain.socket Error on Rake Remote:Setup

Still working through deploying a Rails app (if you’ve been following along, I got Subversion plugged in yesterday). Today was setting up the deployment by running: rake remote:setup The process kept erroring out saying: No File or Directory – /tmp/501/SSHKeychain.socket Turns out I had a bunch of cruft in ~/.MacOSX/properties.plist. After cutting out the offending …

Using Names in Rails Routes Instead of IDs

I spent tonight cranking through some Ruby on Rails has_many :through association oddities and after pounding my head against the keyboard, I decided to shift gears and figure out Ruby On Rails Routes. By default, the Rails expects ID to be passed in URL strings. But that’s really lame, and passing words is much cooler …

Locally Running Multiple Rails Apps on OS X

There’s a couple of place describing how to support multiple Rails apps locally. They were either unavailable or way more complicated than I’d like (the HowtoDeployMoreThanOneRailsAppOnOneMachine at the RubyonRails wiki was both). Here’s how I was able to get multiple Rails apps running under Apache on OS X 10.4 Tiger. Created 2 Rails apps; AppOne …

What’s Your Favorite Open Source Project?

Hello gentle reader, I’m looking for your favorite open source projects; applications, websites, services. If the code is available for free and you’re a big fan, throw them in the comments. I’ll start: WordPress – weblog engine and content management system Ruby on Rails – web application framework CocoaMySQL – OS X desktop MySQL database …