Upgrading to Rails 2.3 with git
I upgraded an application to Rails 2.3, starting with making a new empty branch and using that merge back to a staging branch, which is very well described by Olly at the Bamboo Blog.
I had a few issues, which I thought I would collect here in case anyone else has them.
read more
Updating textarea with Ajax: unterminated string literal
If you try to update a textarea with newlines in it via Ajax, you may get an “Unterminated string literal” error. The update coming back may look like this:
$('textarea_to_update').value='line one
line two
line three';
This will fail because the javascript will interpret the newline as the end of the command.
So, replace those newlines with the newline character and the textarea will get updated correctly:
textarea_value.gsub!(/\n/, '\n')
Visualizing git history
I’ve been using git for version control on a new project. Instead of needing a connection to the server (as CVS and SVN do), changes are stored locally.
Every once in a while, I want to poke back the history. git ships with a graphical repository viewer, but I like gitx better.
git makes branching off to try something super easy, which is quickly becoming one of my favorite features. I can create a branch quickly, try something out, switch away and come back later if I want.
Using gitx to view my repository history, I can quickly find where branches diverged and it’s just kinda neat to look at.

Posted by Wes in