Converting Subversion repositories to Git
February 24th, 2008
A few friends have asked about converting their Subversion repositories to use Git, but also have a central repo that they can push/pull with which mimics their Subversion setup. Here’s what I do so that I don’t have to repeat myself :)
Read the rest of this entryReverse DNS and email
February 4th, 2008
I’m not sure how I wrote a blog post about sending email and somehow I left out the part about making sure your mail servers have IP addresses that actually reverse properly.
Read the rest of this entrywill_paginate and remote AJAX links
January 30th, 2008
Updated for will_paginate 2.3.x
So you’re using the will_paginate plugin and want to use remote AJAX links. You’re not using the will_paginate plugin? Simply install it with…
script/plugin install svn://errtheblog.com/svn/plugins/will_paginate
will_paginate is an alternative to the classic_pagination plugin, which is the pagination plugin that basically took the pre Rails 2.0 pagination implementation and packaged it in plugin form. I won’t discuss the differences between the two plugins here, but there’s a good video explaining the two from Railscasts here.
Out of the box, will_paginate doesn’t allow remote AJAX links for page links, so I’ll show you an easy way to add such functionality…
Read the rest of this entryMigrating from Mac OSX Tiger to Leopard
January 4th, 2008
I recently upgraded my Macbook Pro to Leopard, and in the process I took down some notes. Since the MBP is my first Mac, this is also the first time that I’ve had to upgrade the OS. I’m aware that there are upgrade and migration tools that make this whole process quicker and easier, but I’ve heard mixed results about them. I also wanted my install to be fresh, since most of the old school Mac guys seem to go this route.
Read the rest of this entryNew in_place_editor plugin
July 23rd, 2007
I have just released a new plugin that can be found at http://agilewebdevelopment.com/plugins/improved_in_place_editor
This plugin allows all options of the Ajax.InPlaceEditor control to be set. This will also work with the new rewrite of the control, which is currently in the scriptaculous trunk.
This plugin replaces the current rails version of in_place_editor and is drop-in compatible.
Quick summary (more details at the url above)...
Missing options such as onFailure can now be specified…
<%= in_place_editor 'field_id', :on_failure => "function(transport) {alert(\"Error: \" + transport.responseText.stripTags());}" %>
Some options require quoting to be valid in the JS, such as :highlight_color.[1]
1 :highlight_color is the option name for the rewritten version of the control, :highlightcolor is the old name.
The 2 ways to specify the option are…
1) Manually quote the option<%= in_place_editor 'field_id', :highlight_color => "’#000000’" %>
2) Use the :quoted option
<%= in_place_editor 'field_id', :quoted => {:highlight_color => ’#000000’} %>
Check out our other available plugins at http://agilewebdevelopment.com/plugins/owner/72
Capistrano and Joyent Accelerator (Open Solaris)
July 3rd, 2007
I recently had to deploy a Rails application for a client to a Joyent Accelerator. Paul Ingles has released a Capistrano recipe which helps automate this. I recommend using it.
But even with the recipe, I ran into a couple of snags. The first was with the the myprivateip script that Joyent tells you to use, and the second was Solaris’ ln.
myprivateip
There is a script /opt/csw/bin/myprivateip which is referenced in the mongrel_cluster.yml file they make available. I’d link to the page, but for some reason their how-to pages are all broken today.
Well that script didn’t return anything. It’s supposed to return an ip address.
I changed the script to:
#!/bin/sh
/usr/sbin/ifconfig -a | ggrep -A1 lo0 | grep inet | awk '{print $2}'
Which is just a fancy way to get 127.0.0.1. The mypublicip script seemed to be ok. After fixing that, you’ll want to rerun the cap setup task.
ln
Well I’m not the only one with this problem. Jamie’s blog post helped me get past a problem I was having with Capistrano not updating the symbolic link for the current release. Turns out you’ll want to use the GNU version of ln. On the box I was on though, GNU ln was gln and not ln like in Jamie’s setup, so I took a slightly different approach in order to fix the problem. I created a bin folder in my user’s directory and then put a link to gln like so:
ln -s /opt/csw/bin/gln ~/bin/ln
Next, I put my ~/bin a the front of my path. To do so, I edited .bashrc and .bash_profile (since they both had PATH environment stuff set), but that didn’t solve my problem. There was also an environment file inside the ~/.ssh folder, which gets loaded when you run stuff via ssh, which is what Capistrano does of course. So I added ~/bin to the PATH in that file so it looks something like:
PATH=~/bin:/usr/sbin:/usr/bin:<chopped the rest out>
Some other people have replaced a few Capistrano tasks to use gln instead of ln, but that seems sorta nutty to me.
Now Capistrano is cookin with gas.
Redzone Google Maps Integration
June 16th, 2007
Location management has just been made easier with integrated Google maps.
You no longer need to upload an image for your fields, locations, etc. Enter the address of the location and we’ll find it for you (with the help of Google of course).
By clicking on map markers you can view the locations name, address and any other associated information.
You can find out more about the new location manager on the features page.
If you have comments, suggestions on this feature, please post a message in our forums, we’d love to hear from you.
Hotmail blocking emails
April 7th, 2007
Sending emails from a web application can be annoying. Email providers will likely toss your email in the junk folder, if you’re lucky!
Hotmail was rejecting our email recently, but we managed to fix that with the help of SPF.
Read the rest of this entryNew Website Layout
April 4th, 2007
If you’ve visited our site previously, you may notice some changes to our layout and design. If you’re new then welcome to the site, and take my word for it that the site has changed. :)
Our aim was to clean up the look, make things easier to read and keep a consistent look across our Redline and Redzone pages.
We’ve also added a feed to our weblog on the Redline and Redzone pages to make it easier for you to see what we’re up to. We’ll be posting about new and upcoming Redzone features along with various technology related topics.
Along with the recent changes, we’ll be updating the features section of our Redzone leagues site to better showcase what’s available in the product. Also keep an eye out for some videos and walkthroughs in the near future.
Let us know what you think of the new changes by leaving a comment or let us know what you’d like to see.
