Archive for January, 2007

Typo errors on postponed articles

Antonio Cangiano January 7th, 2007

This is a tip that I’m writing in the hopes of helping Typo users who will google for the following error messages uninitialized constant ActionController::TestRequest or undefined method `publish!’ for nil:NilClass.

While publishing an article on db2onrails.com, I’ve selected a future publishing date for the post (just to round it off to the half an hour mark). I’ve performed this operation in the past without encountering any problems, but for some bizarre reason (most likely a Typo 4.0.3 bug) it didn’t work this time. The article wouldn’t show up and the /admin section would raise the typical Application Error (Rails). There was obviously some kind of issue with the application and the only reason why the homepage was working fine is because its content was cached.

At this point, I restarted fcgi, reloaded the homepage and boom: uninitialized constant ActionController::TestRequest. If you go to your PhpMyAdmin or access your database by any other means, you should drop the ‘offending’ article that you intended to publish (you can find it in the contents table). If you reload your application now, you should see another error: undefined method `publish!’ for nil:NilClass. This is due to the fact that in the table triggers there is a publishing action waiting to be executed on an article that no longer exists.

Please follow the instructions below as a quick fix to the problem, if you encountered these errors in Typo just after you did a post dated in the future:

  1. Drop the problematic article from the contents table. You should first take note of its id and make a copy of its body if you don’t have it already (as you are going to publish it again in a few moments).
  2. Drop the corresponding record from the triggers table. You’ll recognize the raw by the pending_item_id (which is the same number as the id for the record you just deleted in contents) and the trigger_method field set for publishing.

Your blog should be back up and you’ll be able to access the /admin section as well. You can now repost the initial message, just make sure not to set a future date and time again. ;-)

Collage of Ruby and Rails books

Antonio Cangiano January 5th, 2007

While working on a presentation for a series of conferences that I’ll be speaking at, I’ve put together this image, to convey the attention that Ruby and Rails are currently getting from publishers. Feel free to use it for your own presentations, optionally crediting it to me if you’d like (you don’t have to).

The list of books may not be complete. And yes, the book images are from Amazon.com

Ruby is the Programming Language of 2006

Antonio Cangiano January 5th, 2007

Quoting TIOBE (emphasis mine):

January Headline: Ruby declared TIOBE’s Programming Language of 2006!

We are glad to announce that Ruby has become ”Programming Language of the Year 2006”. Ruby has the highest popularity increase in a year of all programming languages (+2.15%). Runner up this year is JavaScript with +1.31%. Both languages are boosted by their corresponding frameworks, Ruby On Rails and Ajax. This might be a new trend. In the recent past it was necessary to have a large company behind the language to get it in the spotlight (Sun with Java, Microsoft with C#), but nowadays a killer app appears to be sufficient. Viral marketing via the Internet works! The winners of the last 2 years, PHP and Java, are the losers of this year. Other trends that are observed are the growth of dynamically typed languages and the fact that the difference in popularity between languages is getting less.

« Prev