SyntaxHighlighter

Tuesday, September 25, 2007

Feature complete

The last two features - Ratings and Email went in quickly, but email required some tricks that I'll outline below. I was trying to hook up with my Google Apps account, and this required some extra configuration as Google requires SMTP+SSL or TLS.

Here's what I did to get my Ruby on Rails app to send email through ActionMailer using Google Apps.

First - you need to add a plugin. Follow the instructions on this blog post by Stephen Chu How to use Gmail SMTP server to send email in Rails ActionMailer. The plugin is necessarly to allow ActionMailer to use TLS.

Lastly, I was getting errors in production. No template found...

The answer to this problem was on a blog post by Miroslav Škultéty: No rhtml, rxml, rjs or delegate template found.

It is still slow, the server logs in to send the email while the browser waits for a response. I'll fix this later and figure out how to move it to a separate thread.

Tuesday, September 11, 2007

Image Upload and resizing using mini_magick

I got the image upload piece working on my new app. I used mini-magick and it went just great. I followed the post at railsforum and it went relatively smoothly. I had to unpack the gem for mini_magick and make it a plugin so it could run at TextDrive. They don't have this gem in their library.

Sunday, September 09, 2007

Setting up a Mac for Ruby on Rails Development

I use Textdrive.com for my hosting, and I was developing on a Windows PC running XP pro. I wanted to switch to a Mac so I could (hopefully) load the gems that I need in my ruby application like ImageScience, or Mini-Magick. I was having trouble getting these running on a PC. I assumed the operating system of the Mac and my Linux based server would be more similar than the pc, and a laptop sounds useful.

So I bought a 15" macbook pro from Powermax and followed the instructions on this site:

http://hivelogic.com/narrative/articles/ruby_rails_lighttpd_mysql_tiger

Textdrive uses Rails 1.1.6, so I stuck with the older installs on Rails. For the most part, the article was great - a little out of date with a few links, but those were easy enough to work around. For example, the link to the Mac Mysql package was old, but finding the latest link was easy enough.

There is an updated article referenced that I didn't try.

Overall, setting up the Mac for development with Ruby on Rails went very smoothly. I'm pretty new to system configuration, and it's been years since I used a mac regularly, so I was pleasantly surprised how it went. I now only use the PC for IE testing and for Photoshop work (until I can start creating graphics on the Mac).

Been a while

It's been a while since I've been posting, but will start doing this again more frequently.

I left Snapvine at the end of August - we'd just wrapped up the latest version, which was a heavy web-focused release. I'm now trying to start a venture, a website for actors and film makers, with my brother in LA.

That's the details in a nutshell. I'll now return to my normal blog topics.