Archive | May, 2006

Rails 1.1 Reference sheet

Courtesy of InVisible, here is an exhaustive Ruby on Rails 1.1 Cheat Sheet. I’ve added a copy of it here so I know where to find it: Rails 1.1 Cheat Sheet. There is also a PDF version available.

Read full story Comments { 2 }
Rails 1.1 Cheat Sheet

Rails 1.1 Cheat Sheet

Ruby on Rails 1.1 Reference

Create a rails application

Read full story Comments Off

Arghhhhh! The path to ruby lib is wrong!

nanoRAILS was down for the past 12h because of a setup change on my host on DreamHost.

Suddenly, the link /usr/local/lib/ruby was changed to point to an incorrect location, so instead of having the ruby libraries under /usr/local/lib/ruby/1.8, they would effectively be under /usr/local/lib/ruby/ruby/1.8 :(

Suffice it to say that things don’t work too well after that.

Read full story Comments Off

Javascript console

Javascript is great when it works. When it doesn’t work, it can get you from happy to miserable in less time than it takes you to say XmlHttpRequest.

Today I just found (via Ajaxian) an interesting tool that I’m adding to my arsenal when it comes to figuring out what’s happening in javascript. Definitely an invaluable debugging tool. It is called JavaScript Shell. When you embed the script, you get a command line window where you can make javascript calls directly from inside your web page.

Read full story Comments { 4 }

Can you host a modified GPL software and not release it?

Here’s the question I was faced with today.

If you install a software that is licenced under the GPL license on a server, and let people interact with the software, do you have to make the source available? And furthermore, if you did modify that software, are you obligated to release that software along with the source.

Read full story Comments { 9 }
Caching ads from TextLinkAds in rails

Caching ads from TextLinkAds in rails

In the first part, I explained how you could
Display ads from TextLinkAds in a rails application.
This created the basis for today’s addition: caching.

You know that the ads won’t change that often, and saving your bandwith and CPU cycle (and TextLinkAds too) is not too much to ask.

Read full story Comments { 3 }

readable output in rails script/breakpointer

After hours spent in breakpointer struggling to make sense of the output, I figured there had to be a better way to look at a stack trace than what the default output provides:

Read full story Comments { 2 }

Using the standard output in script/breakpointer

When you use script/breakpointer, once you have stopped in irb, if you try using print, puts or some other way to display something, your ouput goes to your main rails output, not to irb, which is not quite convenient.

Read full story Comments Off
Displaying ads from TextLinkAds in a rails application

Displaying ads from TextLinkAds in a rails application

Once my application with TextLinkAds was approved, I looked for a sample code to make it work in typo, or more generally in Ruby on Rails. TextLinkAds did not provide any, and a quick search in google did not return anything.

Read full story Comments { 23 }