Archive | Rails RSS feed for this category

Oops. Forgot to Freeze my Gems.

6 June 2008

0 Comments

Sorry for the outage on this blog yesterday. My hosting provider upgraded to Rails 2.1, and I had cleverly forgotten to: bash# rake freeze:rails:gems If this happens to you, and you make the unfortunate mistake of trying to instead update Typo to Rails 2.1 using: bash# rake rails:update You’ll be in even worse trouble, unless […]

Continue reading...

Simple and Terse Vs. Too Clever

26 May 2008

34 Comments

In 21 Ruby Tricks You Should Be Using In Your Own Code, Peter Cooper outlines some really useful best practices that programmers could benefit from. However, I think that there’s a tendency to over-obfuscate code from time to time in the Ruby world. I like terse code. I like beautiful code. But I dislike tricky […]

Continue reading...

Amusing struts app goof-up

19 May 2008

0 Comments

I was paying a parking ticket online to Montgomery County, MD. When the site processed my payment, it submitted to the action shown below. Haha. I am pretty sure I wouldn’t make that mistake with rails routes.

Continue reading...

YAGHB support added to GithubSidebar

13 May 2008

0 Comments

Ben Hughes has created a simpler github badge for his typo blog that renders a little more smoothly in Typo than Dr. Nic’s badge. I added support for YAGHB to githubsidebar today. If you like the look of YAGHB better, you can grab the latest sidebar from github. In the configuration pane, you should now […]

Continue reading...

Rails 2.1 RC1 released

12 May 2008

0 Comments

Well, it’s happened. The Rails 2.1 RC1 release has been tagged at github. If you haven’t already downloaded it after hearing the news on your iPhone RSS Railscast feed, then head on over to Railscasts.com and watch Ryan’s short video on how to install it.

Continue reading...

GitHub Sidebar Plugin for Typo

10 May 2008

0 Comments

I liked Dr Nic’s github badge so much that I wrapped a sidebar plugin around it for Typo users. You can get it from github. Or install it into typo like this: # cd typo/vendor/plugins # git clone git://github.com/peteonrails/githubsidebar.git github_sidebar

Continue reading...

Ruby Gem – Threaded Collections: Process collections over many threads

8 May 2008

7 Comments

I often have to iterate over a collection and perform some remote, or long running task on each member of the collection. Threaded Collections is a package for iterating through collections over multiple threads. With large collections, sometimes it can be more efficient to process a collection in parallel, provided that the collected items don’t […]

Continue reading...

DRY controllers: Which Framework do you use?

7 May 2008

10 Comments

RESTful applications built with script/generate have a lot of repetitive code. Each generated controller will define default “index” “create” “new” “update” and “destroy” methods that looks similar from controller to controller. There are at least FOUR plugins that aim to DRY up RESTful controllers each with their own benefits and weaknesses: make_resourceful – There’s a […]

Continue reading...

Integrating with Services that exhibit the Java Timezone Issue

6 May 2008

2 Comments

In my last post, I described an XML over HTTP service written in Java that I have to integrate with. I expressed a minor and general annoyance at the fact that the developers of this service specify that a “DateTime” parameter be specified in “milliseconds since the epoch”. There is another typical problem with Java […]

Continue reading...

Converting to and from Unix / Java time (epoch)

6 May 2008

5 Comments

Working in telecom, I have to integrate my Rails and plain Ruby apps with Java or Unix based systems running on remote hosts. Most often these systems are running remotely and are accessed via an XML-over-HTTP interface (no SOAP, no REST, blah…). I’ve found that one of the most infuriating things that UNIX and Java […]

Continue reading...