<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2958021377042600373</id><updated>2010-08-24T17:57:08.945-07:00</updated><title type='text'>Nuby Ruby / Rails Tales</title><subtitle type='html'>Learning to use Ruby on Rails, or... the trials and tribulations (and jubilations) of a ruby nuby.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default?orderby=updated'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default?start-index=26&amp;max-results=25&amp;orderby=updated'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-7068673843063237296</id><published>2010-08-24T17:57:00.000-07:00</published><updated>2010-08-24T17:57:08.961-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux installation'/><title type='text'>Firing up a new Kubuntu machine for Rails development...</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Well... it finally happened.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;My Kubuntu machine which I prefer to use for Rails development was getting pretty crochety. I had started out on 7.04, did a distribution upgrade to 8.04, ran into some major problems installing DropBox (&lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.linuxformat.com/"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;LinuxFormat Magazine&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; helped me fix this problem). Finally, I tried a distribution upgrade to 9.10 and it was barely limping along. Several folks suggested a clean install from scratch, so I decided to go with Kubuntu, 10.04, 64-bit. &amp;nbsp;Here's how I went about it.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Prior to the installation, I took a tar backup of my system and also did a copy (cp -a ...) to an external USB drive. Be careful with cp: if you have other media attached (like another network-attached drive I had a /media/wdhd1), the command "cp -a / /&lt;usb-drive&gt;" will follow all those links and try to get EVERYTHING onto the USB drive. I wound up simply copying over the directories that I was most interested in gaining quick access to, such as: /home, /etc, /root, /rails-app. If you've got an old system that you're going to replace, pick the directories that you don't want to lose.&lt;br /&gt;&lt;/usb-drive&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BTW, I really like the &lt;/span&gt;&lt;a href="http://www.iocellnetworks.com/"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;NDAS combo drives&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: eSata, Network-Direct Attached, USB. Reasonably-priced and very effective.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol id="internal-source-marker_0.8316391922267606"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;First get Kubuntu (or whatever flavor of Linux distro you want). I went to the Kubuntu site at &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;a href="http://www.kubuntu.org/getkubuntu"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://www.kubuntu.org/getkubuntu&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; where you can either download directly or get a CD/DVD. I downloaded the 64-bit desktop version here: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;a href="http://www.kubuntu.org/getkubuntu/download#download-block"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://www.kubuntu.org/getkubuntu/download#download-block&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Install kubuntu - pretty straight-forward.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Make sure that your machine will boot from a CD&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Insert CD, reboot, follow the instructions.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;A  true linux sysadmin might have gotten fancy with the disk partitioning,  but I just went with the default which was everything in a single  partition. It’s not like this is a heavily-loaded server...right?&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;There were a number of prompts for keeping or replacing existing files (such as mysql/mycnt, /etc/apcupsd/apcupsd.conf, /etc/cups/cupsd.conf, etc...) and I just took the default since I had copies of all my previous config files.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;At one point, my mouse went inactive (I connect it through a KVM switch) but that cleared up pretty quickly.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Installl  your favorite browser by using Kubuntu’s built-in Konqueror browser. I  chose Chrome -- I’ve been using Firefox for years, but in the past, I’ve  run into problems with Firefox on Linux: older versions, conflicts when  trying to upgrade... I still use FireFox on Windows/Mac, but Chrome is  my preferred browser for Linux.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The Ubuntu community has a very good site on how to do the Rails install: &lt;/span&gt;&lt;/span&gt;&lt;a href="https://help.ubuntu.com/community/RubyOnRails"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;https://help.ubuntu.com/community/RubyOnRails&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Make  sure you DO NOT do “sudo apt-get install rails”. This gives you an old  version and you can’t track your gems easily. If you mistakenly do that,  simply type “sudo apt-get remove rails” and go back to the above link&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;REMEMBER to add the new ruby gems path to your path so that your system can find the stuff you just installed (this is in the . The command is: &lt;br class="kix-line-break" /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;“&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: #f0eee6; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;export PATH=/var/lib/gems/1.8/bin:$PATH”&lt;br class="kix-line-break" /&gt;You’ll have to add this to your .bashrc file so that it will always be done when you start up.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="background-color: #f0eee6; color: black; font-family: Verdana; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-roman; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;BTW,  I add the following two aliases to my .bashrc so that I can quickly and  easily edit .bashrc and update my environment for any new values&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alias brcs='source /home/jseidel/.bashrc'&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;alias brcvi='vi /home/jseidel/.bashrc'&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-roman; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The  ‘brcvi’ alias drops me into vi (replace with your preferred editor) so  that I can make changes. Notice that it always points to my home  directory so that I can do this regardless of where I am.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-roman; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;the  ‘brcs’ alias “sources” the current/updated .bashrc file. I.e., it  “Reads &amp;nbsp;and &amp;nbsp;executes &amp;nbsp;commands &amp;nbsp;from .bashrc in the current shell  environment”, with the result that the changes you made are reflected in  your current bash environment. So to add a new alias, I create the  alias in my current bash, test it out, then brcvi to add it to my  .bashrc and then brcs to make it active and then test to make sure I  didn’ have a typo.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Install git -- you are using git, aren’t you? GitHub has a great tutorial on how to do this. Just go to: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://help.github.com/linux-git-installation/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://help.github.com/linux-git-installation/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; and follow the instructions&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Once you’ve installed git, you have to generate an SSH keypair (see &lt;/span&gt;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Secure_Shell"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://en.wikipedia.org/wiki/Secure_Shell&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; if you want to learn more about SSH and &lt;/span&gt;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Public-key_cryptography"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://en.wikipedia.org/wiki/Public-key_cryptography&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  if you want to learn more about keypairs) so that you can speak  encrypted git. &amp;nbsp;GitHub has another excellent tutorial on how to do this;  see &lt;/span&gt;&lt;/span&gt;&lt;a href="http://help.github.com/linux-key-setup/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://help.github.com/linux-key-setup/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.  Just follow the instructions there and you should have no problem. I  did install the xclip utility -- makes it easy to copy/paste the  information into github.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;If you don’t want to key-in your SSH passphrase everytime you use it, GitHub has help here as well. Go to &lt;/span&gt;&lt;/span&gt;&lt;a href="http://help.github.com/working-with-key-passphrases/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://help.github.com/working-with-key-passphrases/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  and about half-way down the page there’s a section on “autolaunching  ssh-agent” when you start your machine so that you only have to enter  the passphrase once when you boot your machine.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Turns  out I had some permissions problem in my .ssh directory: I kept getting &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;“Bad owner or permissions on /home/jseidel/.ssh/config” &lt;br /&gt;when testing  things with “ssh git@github.com”. &amp;nbsp;Well, GitHub was there again, with  their trouble-shooting page at &lt;/span&gt;&lt;/span&gt;&lt;a href="http://help.github.com/troubleshooting-ssh/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://help.github.com/troubleshooting-ssh/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. Towards the bottom of the page in the “SSH Config” section, the two ‘chmod’ commands did the trick for me.&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 17px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;chmod 700 ~/.ssh&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 17px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;chmod 600 ~/.ssh/*&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;And don’t forget to setup your git config options -- at least these two&lt;br class="kix-line-break" /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;git config --global user.name "your name"&lt;br class="kix-line-break" /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;git config --global user.email your@email.com&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;I use RubyMine &lt;/span&gt;&lt;/span&gt;&lt;a href="https://docs.google.com/a/edpci.biz/document/edit?id=1ang7UlitjQRU54Gwju3VjeTXG3JhpjYiekzdPoK0Wzk&amp;amp;hl=en"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;(http://www.jetbrains.com/ruby/download/index.html#linux&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;  for a 30-day free trial) so that was the next thing to install. Replace  this section with whatever IDE you prefer: Aptana, NetBeans, ... &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;To run RubyMine, you have to have the Sun Java (JDK 1.6). I found that at &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://www.oracle.com/technetwork/java/javase/downloads/index.html&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; and followed the instructions. It turned out to be completely straight-forward.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Now you’ve got everything ready to do; let’s create your first rails app in your shiny new Linux development machine:&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;rails MyApp&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;cd MyApp&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;git init&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;git commit -m "Empty Rails application"&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Now create your github repository -- GitHub has the answer again: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://help.github.com/creating-a-repo/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;http://help.github.com/creating-a-repo/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Once this is done, copy in the repository URL&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Back to bash and hooking up your new repository with your new rails app&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Tell your local git repository about the github repository: &lt;br class="kix-line-break" /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;git branch add origin &lt;github myapp="" url=""&gt;&lt;/github&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; list-style-type: lower-alpha; text-decoration: none; vertical-align: baseline;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Push your MyApp rails application up to github:&lt;br class="kix-line-break" /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;git push origin master&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;And you should be good-to-go -- happy rails to you!&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-7068673843063237296?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/7068673843063237296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2010/08/firing-up-new-kubuntu-machine-for-rails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/7068673843063237296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/7068673843063237296'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2010/08/firing-up-new-kubuntu-machine-for-rails.html' title='Firing up a new Kubuntu machine for Rails development...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-7657574390838576607</id><published>2010-05-26T17:23:00.000-07:00</published><updated>2010-05-26T17:23:57.993-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux installation'/><category scheme='http://www.blogger.com/atom/ns#' term='rmagick'/><title type='text'>RMagick (finally) installed on Kubuntu...</title><content type='html'>Start with the very well-done RMagick installation FAQ at: &lt;a href="http://rmagick.rubyforge.org/install-faq.html"&gt;http://rmagick.rubyforge.org/install-faq.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;./configure runs OK, then make throws this error: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "error: ‘png_info’ has no member named ‘trans’"&lt;br /&gt;&lt;br /&gt;After much searching and trying, ran into several other errors, and finally realized I had to install the ImageMagick development support package&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_BRhkpMuOk1g/S-YIMRe1mKI/AAAAAAAAALw/wL0JhSDPaGk/s1600/screenshot_063.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="76" src="http://3.bp.blogspot.com/_BRhkpMuOk1g/S-YIMRe1mKI/AAAAAAAAALw/wL0JhSDPaGk/s320/screenshot_063.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And there's a huge dependency list:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_BRhkpMuOk1g/S-YIaV25I-I/AAAAAAAAAL4/ihuCjSJb1Rc/s1600/screenshot_062.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_BRhkpMuOk1g/S-YIaV25I-I/AAAAAAAAAL4/ihuCjSJb1Rc/s320/screenshot_062.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Went to KPackageKit to get the development version which installed correctly...&lt;br /&gt;&lt;br /&gt;But it still failed in RMagick installation because it (RMagick) needed a later version (I had 6.5.4 and Rmagick 12.13.1 wanted 6.5.9)&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_BRhkpMuOk1g/S-YIyYOFL6I/AAAAAAAAAMA/1LJ138nD-3Q/s1600/screenshot_064.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="275" src="http://3.bp.blogspot.com/_BRhkpMuOk1g/S-YIyYOFL6I/AAAAAAAAAMA/1LJ138nD-3Q/s320/screenshot_064.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Went to the ImageMagick home page and downloaded and installed their latest version (6.6.1-7) and that installed correctly...&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;But now when trying to run the ImageMagick convert program (as a quick test), I got another error message:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; "error while loading shared libraries: libMagickCore.so.3: cannot open shared object file: No such file or directory"&lt;/div&gt;&lt;br /&gt;Here's the key to getting ImageMagick to finally run... which I finally stumbled upon at &lt;a href="http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&amp;amp;t=15702"&gt;http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&amp;amp;t=15702&lt;/a&gt; after getting that error message. Put the following two lines in your .brashrc (or equivalent) and now it works... Obviously something to do with default paths and where ImageMagic was installed.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; export LD_LIBRARY_PATH="/usr/local/lib"&lt;br /&gt;&lt;br /&gt;Hopefully, some of these pointers will help someone.&lt;br /&gt;&lt;br /&gt;Unbelievable...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-7657574390838576607?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/7657574390838576607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2010/05/rmagick-finally-installed-on-kubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/7657574390838576607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/7657574390838576607'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2010/05/rmagick-finally-installed-on-kubuntu.html' title='RMagick (finally) installed on Kubuntu...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_BRhkpMuOk1g/S-YIMRe1mKI/AAAAAAAAALw/wL0JhSDPaGk/s72-c/screenshot_063.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-1570846085701488069</id><published>2010-04-29T17:35:00.000-07:00</published><updated>2010-04-29T17:35:00.672-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='git commit message'/><title type='text'>Changing erroneous git commit message...</title><content type='html'>Just the other day, I was making a few small changes to my new site and noticed -- just before I pushed them to github -- that I had created a bad commit message: somehow I had copied the text from the previous commit. Not Good.  I figured that would be easy to change and -- while it turned out to be quite easy -- it wasn't easy to find how to do it. Googling under various phrases kept getting me things like:&lt;br /&gt;&lt;br /&gt;"...just use git rebase -i and 'edit' the commit."  While that's quite true, unless you really get git, it's like the old &lt;a href="http://www.bastichlabz.org/%7Etigger/TechHumor/mshelicopter.txt"&gt;Microsoft helicopter joke&lt;/a&gt;. (I suppose if I really read through the excellent &lt;a href="http://git-scm.com/documentation"&gt;documentation provided for git&lt;/a&gt;, I would have been able to figure it out, but that's a lot of reading for a quick fix.)&lt;br /&gt;&lt;br /&gt;I finally had some help from my friend &lt;a href="http://www.rubyfocus.biz/connection"&gt;Wolf Arnold&lt;/a&gt; and with a little bit of trial and error, I was able to modify my commit message and then push my 3 commits to github.  Here's how to do it. NOTE: This procedure only works if you have not pushed your commits. Once pushed, the commit message is inviolable - by design - as far as I can tell.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;First, make sure you know which commit you want to change. I used &lt;a href="http://sitaramc.github.com/1-basic-usage/gitk.html"&gt;gitk&lt;/a&gt; (for Linux; &lt;a href="http://git-scm.com/documentation"&gt;gitx&lt;/a&gt; on the Mac), which gives you a visual display of your commits and the status of the remotes you are pushing to. Find the relative position of the commit you want to change. In my case, it was the 2nd on the list -- that is, one down from the top.&lt;/li&gt;&lt;li&gt;In your root project directory (where you normally type your "git status" and other commands), type the following:&lt;br /&gt;&lt;pre&gt;git rebase -i HEAD~n&lt;br /&gt;&lt;/n&gt;&lt;/pre&gt;where 'n' is equal to your commit's position on the list, counting from 1 at the top of the list. Notice that the character between HEAD and n is the "twiddle" character or "tilde".&lt;/n&gt;&lt;/n&gt;  &lt;/li&gt;&lt;li&gt;Once you enter that command, you are presented with a screen (in your favorite editor) that looks something like this (the numbers following 'pick' are the internal ids for your commits):&lt;br /&gt;&lt;pre&gt;pick &amp;lt;lots of numbers&amp;gt;&lt;br /&gt;pick &amp;lt;lots of different numbers&amp;gt;&lt;br /&gt;# Rebase 9a122e0..9a122e0 onto 9a122e0&lt;br /&gt;#&lt;br /&gt;# Commands:&lt;br /&gt;#&amp;nbsp; p, pick = use commit&lt;br /&gt;#&amp;nbsp; e, edit = use commit, but stop for amending &lt;br /&gt;#&amp;nbsp; s, squash = use commit, but meld into previous commit &lt;br /&gt;# # If you remove a line here THAT COMMIT WILL BE LOST.&lt;br /&gt;# However, if you remove everything, the rebase will be aborted.&lt;br /&gt;#&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;At this point, you can do one of several things:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Edit the file and change the word "pick" to "edit" on the top line of the file. That's the commit that you want to change. Save the file and exit the editor. That will set you up to make the changes in your commit.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Delete every line in the file and save/close it. That's equivalent to a No-Op" and will terminate the rebase.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;There are more options, as you can see from the instructions in the file itself, but we'll leave that for another day.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;When the edit finishes, you will receive instructions at the command line.&amp;nbsp; The next step in the process is to run the command:&lt;br /&gt;&lt;pre&gt;git commit --amend&lt;br /&gt;&lt;/pre&gt;and you will again be presented with an edit screen where you can change the commit message (or other things, but I didn't get into that either). Just change the line with the commit message to what you want it to be.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Once that's done and you've saved/closed the file, run the command:&lt;br /&gt;&lt;pre&gt;git rebase --continue&lt;br /&gt;&lt;/pre&gt;and it'll be done. You can use gitk to check things out and then push to whatever remote you're using.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Enjoy...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-1570846085701488069?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/1570846085701488069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2010/04/changing-erroneous-git-commit-message.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/1570846085701488069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/1570846085701488069'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2010/04/changing-erroneous-git-commit-message.html' title='Changing erroneous git commit message...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-1667273126799840984</id><published>2010-04-27T11:42:00.000-07:00</published><updated>2010-04-27T11:42:42.571-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='secure login error messages'/><category scheme='http://www.blogger.com/atom/ns#' term='Authlogic'/><title type='text'>Authlogic login error messages...</title><content type='html'>I've been using autthlogic to provide login/signup features for my new web application, and I really like it. It provides lots of great features and has a fair number of plugins and tutorials to add functionality. &lt;br /&gt;&lt;br /&gt;A few weeks past, I added a password reset feature. This was quite straight-forward: I just followed the &lt;a href="http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/"&gt;password-reset tutorial&lt;/a&gt; and was up &amp; running pretty quickly. &lt;br /&gt;&lt;br /&gt;However, when I did some additional testing on the basic authlogic functionality, I noticed that it took a very simplistic approach to providing error messages for login failures: it would report "Invalid email address" or "Invalid password" if either of those fields were in error. This is not good security: an attacker could determine a valid email address and then use it for social engineering to gain further information.&lt;br /&gt;&lt;br /&gt;Support to fix this is already in Authlogic -- it's just not the default behavior. You have to add the following method call to your UserSession class:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class UserSession &lt; Authlogic::Session::Base&lt;/br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; generalize_credentials_error_messages true&lt;/br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;More details can be found at: &lt;a href="http://railsapi.com/doc/authlogic-v2.1.3/classes/Authlogic/Session/Password/Config.html#M000178"&gt;http://railsapi.com/doc/authlogic-v2.1.3/classes/Authlogic/Session/Password/Config.html#M000178&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This post is mostly about collecting the various sources of information about Authlogic -- it's such a popular Rails plugin, that there are many search results, some of them dead or not very helpful. I spent almost an hour googling to find the right stuff, and figured I'd post what I found in case it might save someone else some time.&lt;br /&gt;&lt;br /&gt;General github/authlogic documentation page: &lt;a href="http://rdoc.info/projects/binarylogic/authlogic"&gt;http://rdoc.info/projects/binarylogic/authlogic&lt;/a&gt;. The "documentation" link sends you to an &lt;a href="http://rdoc.info/projects/binarylogic/authlogic"&gt;RDoc Info page&lt;/a&gt;: the main page is an overview, and you get more detail by clicking on the 3 buttons in the upper right-hand corner: "Namespace list", "Method list", and "File list".&lt;br /&gt;&lt;br /&gt;More documentation can also be found at: &lt;a href="http://railsapi.com/doc/authlogic-v2.1.3/ "&gt;http://railsapi.com/doc/authlogic-v2.1.3/ &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;All in all, really good stuff!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-1667273126799840984?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/1667273126799840984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2010/04/authlogic-login-error-messages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/1667273126799840984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/1667273126799840984'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2010/04/authlogic-login-error-messages.html' title='Authlogic login error messages...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-7865104051581924245</id><published>2009-10-26T12:45:00.000-07:00</published><updated>2010-04-27T11:11:15.897-07:00</updated><title type='text'>MacPorts headaches...</title><content type='html'>Recently I started doing some of my development work on a little MacBook. Pretty nice as I drop down into terminal, have all the power of *nix (FreeBSD-based in this case), and still have Mac niceties available to me, such as MacVim for editing.&lt;br /&gt;&lt;br /&gt;Everything is rocking along just fine: I've got Cucumber and RSpec running and working my way thru &lt;a href="http://pragprog.com/titles/achbd/the-rspec-book"&gt;"The RSpec Book"&lt;/a&gt; (pretty useful so far). However, I needed to install FXruby so that I could do some graphical work and figured this would be no problem. Turned out to be a little tricky and I had to remember an issue I ran into a while back on a Linux system.&lt;br /&gt;&lt;br /&gt;First off, this won't work:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gem install fxruby&lt;br /&gt;&lt;/div&gt;It'll install that gem alright, but that's not enough to get things running: you have to get Fox installed as well and that doesn't come along with the gem.&lt;br /&gt;&lt;br /&gt;Of course, to do that, you have to install MacPorts which is actually relatively painless (see the &lt;a href="http://guide.macports.org/#installing.macports"&gt;MacPorts Guide&lt;/a&gt; for how to do this).&lt;br /&gt;&lt;br /&gt;Once you've done this, then you can install the complete FXRuby collection of stuff (see the &lt;a href="http://pragprog.com/titles/fxruby/fxruby"&gt;FXRuby Book&lt;/a&gt; at PragProg.com)... &lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo port install rb-fxruby&lt;br /&gt;&lt;/div&gt;and it's a very large collection indeed: it took over 1 hour on my machine.&lt;br /&gt;&lt;br /&gt;The only hitch I ran into was having too old a version of the Mac XTools package, so that was another 800Megs of download and an install. If you do this make sure you get the right version: XTools 3.1 is for OS X 10.5 and XTools 3.2 is for 10.6. Check this first or you'll spend most of an hour installing fxruby only to have it complain about the wrong XTools version and you'll have to start over.&lt;br /&gt;&lt;br /&gt;MacPorts updates your ~/.profile or ~/.bash_profile file (note that the MacPorts install docs only mention ~/.profile and I had to dig a bit to find that they had properly modified my ~/.bash_profile file) so that your system can find the added programs...&lt;br /&gt;&lt;br /&gt;But that's not quite everything you have to do and here was the gotcha for me. Even after I went through all this, I kept getting strange messages out of my test runs, things like:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; "unable to load file ubygems"&lt;br /&gt;&lt;/div&gt;(the missing 'r' is not a typo: that was the exact error message) when executing the "require 'rubygems'" statement.&lt;br /&gt;&lt;br /&gt;I tried adding the command:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; export RUBYOPT=rubygems&lt;br /&gt;&lt;/div&gt;to my profile so that I wouldn't have to add a require 'rubygems' statement but that didn't solve the problem.&lt;br /&gt;&lt;br /&gt;BTW, when I went to the &lt;a href="http://docs.rubygems.org/read/chapter/3"&gt;RubyGems Guide&lt;/a&gt;, they said to use the -rubygems option on the ruby command line, but that also generated the same error.&lt;br /&gt;&lt;br /&gt;After a little more digging, I found the problem: MacPorts installs everything in /opt/local, which is not where the normal gem command installs things (if you do a simple "gem install &lt;gem&gt;' they wind up in /usr/bin).&amp;nbsp; Thus, after MacPorts was installed, ruby got a tad confused and couldn't find everything it needed.&amp;nbsp; Then I remembered what I had run into when I was working on my Linux box: trying to install a LAMP stack: everything got put into /opt/local, but then it was out of the normal stream of things and there were ongoing problems. I finally bit the bullet in that case, removed the LAMP stack, and manually installed everything into their default locations. Life has been pretty good in Linux-land ever since.&lt;/gem&gt;&lt;br /&gt;&lt;br /&gt;The solution? Install rubygems using MacPorts so that my FXRuby could find what it needed. That was a simple:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo port install rb-rubygems&lt;br /&gt;&lt;/div&gt;and now my ruby apps would run again, load the gems, and I had a simple FXRuby app running.&lt;br /&gt;&lt;br /&gt;Quite frankly, I'm not sure of all the nitty-gritty details of this problem and I'm not even sure that I won't have further problems downstream when I want to use another gem, but I'll face that problem when I come to it. If anyone has a definitive answer as to WHY this happened and a better approach to Mac OS X gem&amp;nbsp; installation, I'm all ears.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-7865104051581924245?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/7865104051581924245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2009/10/macports-headaches.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/7865104051581924245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/7865104051581924245'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2009/10/macports-headaches.html' title='MacPorts headaches...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-4440165039485951531</id><published>2010-04-12T18:24:00.000-07:00</published><updated>2010-04-14T04:53:44.538-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='MacOSx'/><title type='text'>Getting PostgreSQL to run on a Mac...</title><content type='html'>&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;So I decided to switch to PostgreSQL from MySQL. First off, it's what's used by default at Heroku, and I'm so far loving Heroku, its great integration with git, and the resulting ease of deployment. Secondly, I'm a tad concerned about what might happen in the future since Oracle now owns MySQL: could be 'interesting'.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Anyway, I'd always heard that installing PostgreSQL was more challenging than installing MySQL: "MySQL put more effort into making things easier for first-time users" is what my friends have told me. But I also heard that PostgreSQL had better and more standard SQL support (for example, support for foreign keys).&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Anyway, with a bit of searching, I finally found&amp;nbsp;&lt;a href="http://wiki.rubyonrails.org/database-support/postgres"&gt;this RubyOnRails page&lt;/a&gt;&amp;nbsp;which seemed to do a great job of laying things out for all 3 platforms. Seemed pretty straight-forward:&amp;nbsp;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Install the server:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f7f9fa; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;"&gt;sudo port install postgresql83-server&lt;/pre&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Start the server:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: large;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f7f9fa; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;"&gt;sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql83-server.plist&lt;/pre&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Setup the database:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f7f9fa; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;"&gt;sudo mkdir -p /opt/local/var/db/postgresql83/defaultdb&lt;br /&gt;sudo chown postgres:postgres /opt/local/var/db/postgresql83/defaultdb&lt;br /&gt;sudo su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/defaultdb'&lt;/pre&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Two problems:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;It failed installing the database -- complaining that it couldn't find the header file libpq-fe.h.&amp;nbsp;&lt;/li&gt;&lt;li&gt;It installed version 8.3 and version 8.4 is now current.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: monospace; font-size: 14px; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: Times; font-size: medium; white-space: normal;"&gt;More searching led me to the MacPorts site which has the required library:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f7f9fa; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;"&gt;sudo port install libpqxx&lt;/pre&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;However, it also wound up installing the 8.4 version of PostgreSQL, but version 8.3 still is the one that gets launched... seems to work, but certainly not as clean as I would like.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Given the problems I had in the past before I cleaned my machine and installed Ruby &amp;amp; Rails "from scratch" with MacPorts (see&amp;nbsp;&lt;a href="http://www.nubyrubyrailstales.com/2010/03/macports-headaches-solved.html"&gt;my previous post on this issue)&lt;/a&gt;&amp;nbsp;as I could easily get PostgreSQL with relatively little hassle.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;So far, so good...&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;PS Check out&amp;nbsp;&lt;a href="http://enterpriserails.chak.org/"&gt;"Enterprise Rails" (Dan Chak, O'Reilly)&lt;/a&gt;. He does a really nice job of discussing Rails' scaling and reliability issues and does it all in the context of PostgreSQL. Good book!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-4440165039485951531?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/4440165039485951531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2010/04/getting-postgresql-to-run-on-mac.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/4440165039485951531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/4440165039485951531'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2010/04/getting-postgresql-to-run-on-mac.html' title='Getting PostgreSQL to run on a Mac...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-2865257258899232573</id><published>2010-04-14T04:40:00.000-07:00</published><updated>2010-04-14T04:40:32.435-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Using PostgreSQL</title><content type='html'>Now that PostgreSQL is installed and running on my Mac, I need to do something useful with it, like create my database and get it migrated through Rails. &amp;nbsp;The terminology and approach is a tad different from MySQL, but after a bit of googling, I found &lt;a href="http://www.postgresql.org/docs/8.4/static/database-roles.html"&gt;this PostgreSQL documentation page&lt;/a&gt; which got me rolling. &lt;a href="http://www.postgresql.org/docs/8.4/static/tutorial-createdb.html"&gt;This page on creating a database&lt;/a&gt; was actually the starting point, because it worked through the various errors which might occur.&lt;br /&gt;&lt;br /&gt;The key difference for me was that the PostgreSQL superuser is called 'postgres', not 'root' as in MySQL. Prior to digging out this piece of information, everything I tried got the following error:&lt;br /&gt;&lt;br /&gt;&lt;pre class="code" style="background-color: #f7f9fa; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; color: black; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;"&gt;createdb: could not connect to database postgres: &lt;br /&gt;FATAL: &amp;nbsp;role "jseidel" does not exist&lt;/pre&gt;&lt;br /&gt;The other thing that was a minor roadblock was getting out of psql (PostgreSQL's interactive SQL command program). The usual MySQL/bash suspects (quit; exit; bye; {Ctrl-C}) didn't work. With psql you either type "\q" or {ctrl-D} and you're out.&lt;br /&gt;&lt;br /&gt;Finally, since I'm using MacPorts, the location of the PostgreSQL files are different than&lt;a href="http://www.postgresql.org/files/documentation/books/aw_pgsql/node175.html"&gt; documented in the PostgreSQL guide&lt;/a&gt;: my files are rooted off&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/opt/local/lib/postgresql84&lt;/span&gt; instead of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/usr/local/pgsql&lt;/span&gt; as is indicated in that guide.&lt;br /&gt;&lt;br /&gt;Now I'm able to create my database and see if it connects with Rails...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-2865257258899232573?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/2865257258899232573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2010/04/using-postgresql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/2865257258899232573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/2865257258899232573'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2010/04/using-postgresql.html' title='Using PostgreSQL'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-1755300292595544518</id><published>2010-03-22T10:26:00.000-07:00</published><updated>2010-03-22T10:26:17.318-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='MacOSx'/><title type='text'>MacPorts headaches... solved!</title><content type='html'>So I finally found a way to solve all those MacPorts headaches,  thanks to Erik Michaels-Ober, a friend of a friend. As I and many folks  have learned, Mac OS X is less than standard *Nix when it comes to  setting up their directories, and it doesn't take kindly to co-creation  of a parallel directory tree. MacPorts puts things in the (*Nix)  standard /opt directory, but once that's done, you get path and name  clashes.&lt;br /&gt;&lt;br /&gt;I've seen bits and pieces of a solution as  noted in my previous posts, but they really didn't fix the problem. And  of course, there's the issue that's been reported elsewhere that  upgrading to Snow Leopard can wreak havoc on a development setup.&lt;br /&gt;&lt;br /&gt;So  following Eriks' instructions, here's what I did:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I wiped my  system clean and installed Snow Leopard from scratch. You may be able  to just do an upgrade, but I chose to go with a clean system.&lt;/li&gt;&lt;li&gt; Install the XCode Developer Tools that come with Snow Leopard (or   download the latest version from the Apple website. Warning: it’s a big   file).&lt;/li&gt;&lt;li&gt;Remove all the pre-installed rubygems from your system.  You can do  this  using the “gem uninstall” command, or brute force. I chose the  brute force method, but only after creating a copy before I did the  deletion, just in case. Once I knew it worked, I got rid of my copies.&lt;code&gt;&lt;br /&gt;rm -rf   /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/*&lt;/code&gt;&lt;br /&gt;&lt;code&gt;rm -rf /Library/Ruby/Gems/1.8/*&lt;/code&gt;&lt;/li&gt;&lt;li&gt; Install MacPorts (see the &lt;a href="http://www.macports.org/install.php"&gt;MacPorts installation page&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;Make sure you’re running MacPorts version 1.8.2 (type: &lt;code&gt;port  version&lt;/code&gt;).  If not, run the command: &lt;br /&gt;&lt;code&gt;sudo port selfupdate&lt;/code&gt;&lt;/li&gt;&lt;li&gt; Install the MacPorts version of ruby itself:&lt;br /&gt;&lt;code&gt;sudo port install ruby&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Install the MacPorts version of rubygems:&lt;br /&gt;&lt;code&gt;sudo port install rb-rubygems&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Install the MacPorts version of git:&lt;br /&gt;&lt;code&gt;sudo port install git-core&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Upgrade to the latest version of rubygems:&lt;br /&gt;&lt;code&gt;sudo gem update --system&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Make sure you’re running rubygems version 1.3.5 (type: &lt;code&gt;gem -v&lt;/code&gt;).   If not, run the command: &lt;code&gt;update_rubygems&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Install all the gems you want (rails, heroku, etc.).  They will be  installed into /opt/local/lib/ruby/gems/&lt;/li&gt;&lt;/ol&gt;I set up my machine about a month ago and it's been working  fine ever since.&lt;br /&gt;&lt;br /&gt;Enjoy...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-1755300292595544518?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/1755300292595544518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2010/03/macports-headaches-solved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/1755300292595544518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/1755300292595544518'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2010/03/macports-headaches-solved.html' title='MacPorts headaches... solved!'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-6020202202898822098</id><published>2009-10-26T14:30:00.000-07:00</published><updated>2009-10-26T14:30:08.363-07:00</updated><title type='text'>MacPorts headaches... follow-up</title><content type='html'>Some of these issues apparently have to do with the order in which things are done and may also depend on the fact that some of these packages require native C-language extensions.&lt;br /&gt;&lt;br /&gt;I wanted to work with nokogiri to do some XML parsing. Given my previous post, I figured I'd better install this using MacPorts, which I did:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo port install nokogiri&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;That was pretty straight-forward and worked quickly. However, when I went to irb to check things out, I got the following message:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;irb(main):001:0&amp;gt; require 'nokogiri'&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;HI. &amp;nbsp;You're using libxml2 version 2.6.16 which is over 4 years old and  has&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;plenty of bugs. &amp;nbsp;We suggest that for maximum HTML/XML parsing pleasure,  you&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;upgrade your version of libxml2 and re-install nokogiri. &amp;nbsp;If you like  using&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;libxml2 version 2.6.16, but don't like this warning, please define the  constant&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;I_KNOW_I_AM_USING_AN_OLD_AND_BUGGY_VERSION_OF_LIBXML2 before requring  nokogiri.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;So I quit irb and installed libxml2&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; sudo port install libxml2 &lt;/span&gt;&lt;/div&gt;&lt;div&gt; &lt;div&gt;which also went just fine.&amp;nbsp; Unfortunately, nokogiri still gave me that long warning message.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What I had to do was re-install nokogiri so that it would recognize the new version of libxml2 (which was now in the /opt/local tree) and then everything worked fine.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Seems like I can get things to work now, but having to remember previous dependencies and re-install packages to pick up those new items isn't going to be fun.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-6020202202898822098?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/6020202202898822098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2009/10/macports-headaches-follow-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/6020202202898822098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/6020202202898822098'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2009/10/macports-headaches-follow-up.html' title='MacPorts headaches... follow-up'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-3343450442912962634</id><published>2009-09-07T12:27:00.000-07:00</published><updated>2009-09-07T12:28:35.512-07:00</updated><title type='text'>A Users Guide is a great developer tool...</title><content type='html'>Today I was reminded just how important documentation is, particularly End-User documentation... you know, the instructions for how folks are actually going to use your system.&lt;br /&gt;&lt;br /&gt;In my spare time, I've been developing a very small system for a client (unfortunately not in Ruby/Rails, but that's another story). It's designed to replace one labor-intensive portion of their Commission calculation process, which is spreadsheet-intensive. You've seen them before: someone develops a simple spreadsheet to "save time" and eventually, the spreadsheet is a monster and the whole process takes days to complete and is fraught with potential errors. And with the sales reps watching the numbers like a hawk, &lt;i&gt;&lt;u&gt;nothing&lt;/u&gt;&lt;/i&gt; slips by.&lt;br /&gt;&lt;br /&gt;The piece I'm replacing is for maintaining the Work In Process costs and pricing factors for the products developed&amp;nbsp; in-house. It's a tiny database application which outputs an Excel workbook that is dropped into the monster spreadsheet and thereby replaces a very time-consuming manual update process. In fact, the process has been so challenging in the past that cost updates have been few and far between. The new system will allow them to make pricing changes at will.&lt;br /&gt;&lt;br /&gt;Over the past few weeks, time permitting, I've developed small pieces of the system and run it by the client to make sure that my understanding is correct, and they've approved the prototype pieces that I've provided to them. This is actually part of my proposal process: try out important pieces of the system, and then let the client approve the results.&lt;br /&gt;&lt;br /&gt;Today, I started writing the contract for the actual development. As part of the scope of work, I provided screen shots and a high-level overview of the procedural steps for using the system. As I worked through the steps in the workflow, I suddently realized that I was omitting one piece! I had prototyped that portion of the system early on and it worked OK, but the table I had created was only a dummy table, hand-crafted for testing, and I had not provided the necessary support for a user to maintain that table!&lt;br /&gt;&lt;br /&gt;Fortunately I found this out before completing development and installing it for my client. At this stage in the game, it was pretty easy to add the required functionality and include it in the Users Guide.&lt;br /&gt;&lt;br /&gt;You can call it what you want: Requirements or Design or Testing. Developing a Users Guide can help in all areas of your application life cycle methodology. In this case, I&amp;nbsp; like to think of the Users Guide as being a form of UI Testing: I used it to test my prototype design (screenshots, data entry forms, reports, and output files) against the user interaction that would be required to &lt;u&gt;&lt;i&gt;actually do something productive&lt;/i&gt;&lt;/u&gt; with the system.&lt;br /&gt;&lt;br /&gt;Does this apply to Rails? You bet! Just watch &lt;a href="http://scotland-on-rails.s3.amazonaws.com/1A06_JosephWilk-SOR.mp4"&gt;Jospeh Wilk's Cucumber presentation at Scotland on Rails 2009&lt;/a&gt;. He suggests that you "...think about the user interface first " and asks "...how is the business user going to achieve value through the interface?" He also stresses figuring out what's really important to you and to your user (see his example of "Popping the Why Stack"). I particularly like his question: "Have we achieved what the user wants yet?" It's all about a single-minded focus on the user of the system and the value that the system is to provide. &lt;br /&gt;&lt;br /&gt;Fortunately my Users Guide test failed and I was able to address the issue today, not later down the road when it would be more time-consuming. And I saved a potentially awkward situation with my client.&lt;br /&gt;&lt;br /&gt;So... I'm going to be more careful about writing Users Guides and testing the user workflow in the future...&lt;br /&gt;&lt;br /&gt;When do you write your Users Guide?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-3343450442912962634?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/3343450442912962634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2009/09/users-guide-is-great-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/3343450442912962634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/3343450442912962634'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2009/09/users-guide-is-great-tool.html' title='A Users Guide is a great developer tool...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-3657622647646796848</id><published>2009-08-28T15:58:00.000-07:00</published><updated>2009-08-28T16:20:03.024-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails upgrade'/><category scheme='http://www.blogger.com/atom/ns#' term='migrations'/><category scheme='http://www.blogger.com/atom/ns#' term='sessions'/><title type='text'>Snipping the blight... fantastic!</title><content type='html'>I've been fighting an elusive bug for the past few weeks: I've developed some major enhancements for &lt;a href="http://www.4mypasswords.com/"&gt;my passwords site&lt;/a&gt; plus upgrading to more recent versions of Rails and associated plugins (improved security and testability being my primary goal).&amp;nbsp; Things were going along fine until I deployed my app to production: I was able to login without errors, but was then immediately returned to the login screen. Needless to say, the &lt;a href="http://www.capify.org/index.php/Capistrano"&gt;Capistrano&lt;/a&gt; deploy:rollback task was just what the doctor ordered (that's why I love Cap: it took a bit to get it setup originally, but it really makes deploying or undeploying applications a snap - if you have an app in production and you don't have Capistrano or something similar, do it now).&lt;br /&gt;&lt;br /&gt;Anyway, I setup up a production environment on my development machine and, sure enough, it failed in production mode but ran fine in development mode. I modified the production settings so that I would get error messages [Note to self: put it back like it was!] and got a message saying that a module in the filter chain had returned false... it looked as if it were failing authentication somewhere in the login system.&lt;br /&gt;&lt;br /&gt;I started digging into the code and using the debugger to see what was going on: from the symptoms and the error message, it seemed to be a problem with session state. Checking with my hosting tech support and local Rails folks, I learned there were reports of problems with sessions in Rails 2.3.2 and one of the local chaps, &lt;a href="http://darkindigo.com/"&gt;Brendon Whateley&lt;/a&gt;, reported some serious session issues that he had and chased the code back to Rails initialization and lots of 'magic' aliasing and overriding of ActiveRecord methods (nice stuff when it works). To quote:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; font-size: x-small;"&gt;"Having spent the best part of a week debugging the sudden failure of sessions recently, I may be able to help.&amp;nbsp; The first thing to figure out is if the session is saving state and not loading, or loading but not saving.&amp;nbsp; In my case the ActiveRecordStore was not serializing the session data, but was loading and saving the session object.&amp;nbsp; This meant that previously set session values still existed, but any changes did not persist across calls.&amp;nbsp; I was able to validate that the logins were successful, but suffered similar issues to you.&lt;br /&gt;&lt;br /&gt;"In the end I tracked the problem down to overriding the ActiveRecord::Base.create_or_update method.&amp;nbsp; For some reason it completely broke ActiveSessionStore serialization, even if the redefined method contained the exact same code as the original.&amp;nbsp; I never completely figured out WHY that broke, but if I moved my changes to create and update methods that create_or_update called, I no longer experienced that problem."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Made sense to me, and since I am using some of the ActiveRecord callbacks, it seemed quite reasonable. So off I went, digging thru my code, researching how the callbacks were used, trying to find out if anyone else was using them, more debugging... all of which went nowhere.&lt;br /&gt;&lt;br /&gt;Yesterday, I bit the bullet and upgraded to Rails 2.3.3. Very easy; just do&lt;br /&gt;&lt;pre&gt;&amp;nbsp;&amp;nbsp;gem install rails &lt;/pre&gt;and try it again in production mode.&lt;br /&gt;&lt;br /&gt;You can imagine my surprise when all of a sudden, the app crashed and emitted the following error messge:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ActiveRecord::StatementInvalid (Mysql::Error: Unknown column &lt;br /&gt;'assets.type_id' in 'on clause': SELECT count(DISTINCT `assets`.id) AS &lt;br /&gt;count_all FROM `assets`&amp;nbsp; LEFT OUTER JOIN `types` ON `types`.id = &lt;br /&gt;`assets`.type_id WHERE ((user_id = 1 and ( entry like '%' or entry &lt;br /&gt;like '%' ))) ):&lt;br /&gt;&amp;nbsp; -e:2:in `load'&lt;br /&gt;&amp;nbsp; -e:2&lt;/pre&gt;I had never received any such error message in Rails 2.3.2 (obviously some kind of bug there which caused this to appear as if it were a filter chain termination), but this made it clear what had happened. In the process of upgrading from Rails 1.x to 2.x, I had experimented with using some database constraint logic. It had been a tad problematic and I wanted to focus on the Rails upgrade so I removed those migrations. It was probably at that point that the development database and the production database got out of sync (I haven't yet gone back to my subversion repository to see exactly what/when it happened, but I may do that yet out of curiosity).&amp;nbsp; I had added a new "type_id" field that was required to support the new version of &lt;a href="http://activescaffold.com/"&gt;ActiveScaffold&lt;/a&gt; and it had never been added to the production database, even though the schemo_info table contained the same information in both databases (I know, because I checked before I started the whole deploy process).&lt;br /&gt;&lt;br /&gt;So what did I learn from this?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Even though there were several other folks looking at this, we all missed the obvious: development and production mode are different not only in the code base but also in the database. I&amp;nbsp; suffered from a &lt;a href="http://en.wiktionary.org/wiki/perceptual_set"&gt;perceptual set&lt;/a&gt; when identifying potential sources of the problem (and &lt;a href="http://nubyrubyrailstales.blogspot.com/2009/08/pair-programming-really-works.html"&gt;Paired Programming&lt;/a&gt; isn't always a silver bullet). In the future, I'm going to be a little more diligent when exploring potential solution spaces.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Rails migrations, while very nice, are also fragile. I've had problems with them in the past: simply checking that the schema_info values are the same just isn't always enough. I'm going to add migrations and database state to my checklist of things to review before deployments or when making changes. &lt;/li&gt;&lt;li&gt;Rails migrations, while very nice, are also something of a siren song, luring one into complacency about the database. "When they are good they are very, very good, and when they are bad they are horrid." After a long period of no problems, I had assumed (mistake!) that they were under control: in a way, I thought of them as if they were "source code control" for my database. They are not, and I'm going to pay more attention to that in the future.&lt;/li&gt;&lt;li&gt;Rails upgrades are in the same category: they can be remarkably easy, such as my switch from 2.3.2 to 2.3.3 or they can be remarkably messy, as has been my switch from 1.3.6 to 2.3.3. On the one hand, I want to stick with a known version: there are just too many changes that I view as frivolous in the Rails code base to want to go through all the deprecations and just plan different stuff unless it's really necesary. At the same time, we do need to stay reasonably up-to-date to take advantage of the definite improvements such as better plugins and greater security. This is an individual decision, based on your particular requirements. Regardless, YMMV.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;So... one more bug snipped out of my app and that much closer to deployment. Some cleanup and more testing and it should be good to go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-3657622647646796848?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/3657622647646796848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/snipping-blight-fantastic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/3657622647646796848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/3657622647646796848'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/snipping-blight-fantastic.html' title='Snipping the blight... fantastic!'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-5089642131767329244</id><published>2009-08-19T11:48:00.000-07:00</published><updated>2009-08-26T11:54:24.281-07:00</updated><title type='text'>Interesting svn "gotcha"... II</title><content type='html'>Turns out, there's any easy fix for this situation (see&lt;a href="http://nubyrubyrailstales.blogspot.com/2009/08/interesting-svn-gotcha.html"&gt; Interesting svn 'gotcha'&lt;/a&gt;). All you have to do is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Checkout your entire project into a different directory using your command line client.&lt;/li&gt;&lt;li&gt;Run the script/plugin install... command on that working copy.&lt;/li&gt;&lt;li&gt;Checkin the updates you just made.&lt;/li&gt;&lt;li&gt;Update the IDE working copy to the latest from repository.&lt;/li&gt;&lt;/ol&gt;Easy; problem solved...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-5089642131767329244?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/5089642131767329244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/interesting-svn-gotcha-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/5089642131767329244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/5089642131767329244'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/interesting-svn-gotcha-ii.html' title='Interesting svn &quot;gotcha&quot;... II'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-8172620145878924667</id><published>2009-08-26T08:41:00.000-07:00</published><updated>2009-08-26T09:08:28.968-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='rspec'/><category scheme='http://www.blogger.com/atom/ns#' term='cucumber'/><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='bdd'/><title type='text'>Learning RSpec/Cucumber - Day 1</title><content type='html'>I've wanted to improve my testing for some time now and so I'm pairing on the RSpec book with my friend, &lt;a href="http://workingwithdata.com"&gt;Allan Miller&lt;/a&gt;. We're going to work through the book/examples in tandem and get together regularly to review what we've learned.  We just downloaded &lt;a href="http://pragprog.com/titles/achbd/the-rspec-book"&gt;the RSpec book by Pragmatic&lt;/a&gt; and assigned Chapters 1-3 (this is the book that was highly recommended by our&lt;a href="http://ruby.meetup.com/81"&gt; Ruby Meetup&lt;/a&gt; folks). We'll work through this and then meet in a couple of days to see how things went and move on to the next group of chapters. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For now, I'm running all this on my MacBook, without any IDE... just straight terminal access and MacVIM. Chapters 1 &amp;amp; 2 are introduction; chapter 3 is where you start actually doing stuff.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First problem (minor) that I ran into was that the rspec installation wasn't clean; I got the following errors:&lt;/div&gt;&lt;div&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Helvetica; min-height: 13.0px"&gt;&lt;span style="letter-spacing: 0.0px"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;Successfully installed rspec-1.2.8&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;1 gem installed&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;Installing ri documentation for rspec-1.2.8...&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;Installing RDoc documentation for rspec-1.2.8...&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;Could not find main page README.rdoc&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;Could not find main page README.rdoc&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;Could not find main page README.rdoc&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;Could not find main page README.rdoc&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;So far, this doesn't seem to have affected anything -- I just ignored it and moved on (so far, I don't use the ri or RDoc information at all).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The cucumber installation was a little more disconcerting:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;Installing ri documentation for builder-2.1.2...&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;ERROR:  While generating documentation for builder-2.1.2&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;... MESSAGE:   Unhandled special: Special: type=17, text="&lt;!-- HI --&gt;"&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;... RDOC args: --ri --op /Library/Ruby/Gems/1.8/doc/builder-2.1.2/ri --title Builder -- Easy XML Building --main README --line-numbers --quiet lib CHANGES Rakefile README doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc --title builder-2.1.2 Documentation&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;span style="letter-spacing: 0.0px"&gt;(continuing with the rest of the installation)&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Courier New"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;but again, it was only documentation so I moved on from here as well (have to pick your battles, you know).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Everything went just fine, except for a couple of glitches: one was just some missing default snippets and the other was a result of those missing snippets. Here's what happened:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;The first attempt at cucumber did NOT display the snippets for the 3 undefined steps (pp 27-28 in my beta copy of the book) as expected. Rather than being able to copy and modify them I had to type them in by hand. [I tried the command twice just to make sure.. sure enough, didn’t display, although a later point where I had only one step undefined, it DID display the snippet template. Go figure.]&lt;/li&gt;&lt;li&gt;Because of #1, I made a transcription error in the regexp for step 3: I omitted the ‘^’ exclusion character. This cost me several minutes (regexp’s are like that!).  I have a feeling that there may be more of these... hopefully I’ll be able to get the step snippets more reliably in the future and then just copy them into my step definitions as a starting point.&lt;/li&gt;&lt;/ol&gt;All in all, a successful beginning... But I do have a concern -- given that we're using regexp's, there are MANY opportunities for small errors that can cost time. Seems like a bit of a contradiction: cucumber is a "higher level" testing language than rspec, but it uses one of the lowest level syntaxes to accomplish this. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'll just have to wait and see what this leads to... and I'm sure going to copy/paste those snippets whenever I can.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-8172620145878924667?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/8172620145878924667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/learning-rspeccucumber-day-1.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/8172620145878924667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/8172620145878924667'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/learning-rspeccucumber-day-1.html' title='Learning RSpec/Cucumber - Day 1'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-4390546988354031547</id><published>2009-08-26T06:32:00.000-07:00</published><updated>2009-08-26T06:54:19.226-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveScaffold'/><category scheme='http://www.blogger.com/atom/ns#' term='pair programming'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='AjaxUpdater'/><title type='text'>Pair programming really works!</title><content type='html'>I've known this in the past and I had another "Aha!" moment the other day: pair programming (or debugging in this case) is great!&lt;br /&gt;&lt;br /&gt;I've had a problem for  the past week or so in one of my applications. I'm in the middle of a big upgrade (from Rails 1.3.6 to Rails 2.3.2 and lots of other associated changes), when I hit a hard stop; my screen wasn't getting updated correctly after an Ajax call.&lt;br /&gt;&lt;br /&gt;I struggled with this for quite some time and then today called &lt;a href="http://www.workingwithdata.com/"&gt;Allan Miller&lt;/a&gt;, a good friend of mine over to help me debug it. He sat down, I described he problem and demonstrated it. He said "Well, let's take a look and make sure that you're actually getting an XHR request." so we fired up FireBug and entered a couple of trials: the POST request was properly executed and my application did see it as an XHR request. Everything's working as exepcted so far, but no errors and no screen refresh.&lt;br /&gt;&lt;br /&gt;Since he had been focusing on the Ajax call, I decided to show him the code on the page, and used FireBug's feature to "click an element to inspect" and pointed out the code [line breaks inserted for readability; this is all one line of code]:&lt;br /&gt;&lt;pre&gt;&amp;lt;a class="ltr-locate" onclick="new Ajax.Updater('asset-content', '/asset/get_assets?ltr=F',&lt;br /&gt;{asynchronous:false, evalScripts:true, parameters:'authenticity_token=&lt;br /&gt;' + encodeURIComponent('xxx')}); return false;" href="/asset/get_assets" align="right"&amp;gt;F&amp;lt;/a&amp;gt;&lt;/pre&gt;&lt;br /&gt;"See" I said. "There's the AjaxUpdater call to update the... ... that's it!" The first field in the AjaxUpdater call signifies the named area on the page that will be updated as a result of the call. In this case 'asset-content'. "I'll bet that they changed the name in the intervening releases" I said.&lt;br /&gt;&lt;br /&gt;Sure enough, that was the case: the name name is 'as_asset-content' and updating the link_to_remote call solved the problem. What a relief!&lt;br /&gt;&lt;br /&gt;I've got 3 take-aways from this:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Two heads are at least 10 times better than 1, if you compare 50 total minutes of work (25 minutes times 2 heads) with at least 10 hours of work with my one head. There's just something magical about having to REALLY explain your code to an outside observer that makes you think thru things much more carefully. It's making the thinking process external, rather than internal where your hidden assumptions come into play without your even knowing it.&lt;/li&gt;&lt;li&gt;The AjaxUpdater call gives NO ERROR if the named area doesn't exist; it just quietly closes up shop, assuming that you knew what you were doing.&lt;/li&gt;&lt;li&gt;I was reminded how great FireBug is for this kind of thing. Quick and easy to see that the Ajax call was firing with the right information so that we could move on to the next question.&lt;/li&gt;&lt;/ol&gt;Extrapolating that out, I would imagine that -- had there beeen two folks in the seat from the beginning -- this whole thing wouldn't have taken so long... and the code would probably be better for it.&lt;br /&gt;&lt;br /&gt;Reminds me of the old "Double your pleasure..." chewing gum ad, only in this case it's really true.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-4390546988354031547?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/4390546988354031547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/pair-programming-really-works.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/4390546988354031547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/4390546988354031547'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/pair-programming-really-works.html' title='Pair programming really works!'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-7076446320657012050</id><published>2009-08-17T16:31:00.000-07:00</published><updated>2009-08-17T17:25:46.527-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='subversion client'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Aptana'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux installation'/><title type='text'>Interesting svn "gotcha"...</title><content type='html'>I just learned that you have to be careful about which version of subversion you are using if you have an IDE and also want to use the command-line client.&lt;br /&gt;&lt;br /&gt;Starting about V1.4, there were changes in the internal structure of the subversion directory hierarchy (i.e., the .svn files that it creates to track things) which means that you have to make sure that your versions are in synch.&lt;br /&gt;&lt;br /&gt;For example, I'm using &lt;a href="http://aptana.com/"&gt;Aptana Studio&lt;/a&gt;, which is eclipse-based, and which uses the latest subclipse client (&lt;a href="http://subclipse.tigris.org/"&gt;subversion for Eclipse&lt;/a&gt;). That latest version is V1.6. However, on my Kubuntu development box (V8.04/Hardy Heron), the latest subversion package right now is V1.4. If I try to run a subversion command from the shell, I get this error message:&lt;br /&gt;&lt;blockquote&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;jseidel@EDP15:~/AptanaStudio/4MyPasswords$ svn status&lt;br /&gt;svn: This client is too old to work with working copy '.'. You need&lt;br /&gt;to get a newer Subversion client, or to downgrade this working copy.&lt;br /&gt;See &lt;a href="http://subversion.tigris.org/faq.html#working-copy-format-change"&gt;http://subversion.tigris.org/faq.html#working-copy-format-change&lt;/a&gt;&lt;br /&gt;for details.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;The help link above will explain that -- due to new features in the later versions -- they had to introduce new structure which is incompatible with the older clients.&lt;br /&gt;&lt;br /&gt;Since I don't want to downgrade my working copy, I went looking for V1.6 command-line clients. Sad to say, they aren't packaged (yet) for Kubuntu/Hardy --so far I only found it for the &lt;a href="https://launchpad.net/ubuntu/+source/subversion"&gt;Karmic version of Ubuntu&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There are other svn clients out there, either as wrappers around the command line client, or full-on clients. One that I looked at was &lt;a href="http://kdesvn.alwins-world.de/"&gt;kdesvn&lt;/a&gt;. This looked to be a nice client and was at V1.6. Unfortunately, the developer only provides a Fedora package, so I would have to build my own from source.&lt;br /&gt;&lt;br /&gt;I went to the &lt;a href="http://subversion.tigris.org/"&gt;subversion site&lt;/a&gt;, but the referenced Ubuntu binaries only pointed back to the Ubuntu site and the older version, so I tried building it from source. Bad move! As stated on their site, there are a number of dependencies which I started to work through one at a time. When I reached a point of having to figure this out:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;jseidel@EDP15:~/downloads/subversion-1.6.4/subversion-1.6.4$ apr/buildconf&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buildcheck: checking installation...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buildcheck: autoconf version 2.61 (ok)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buildcheck: autoheader version 2.61 (ok)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buildcheck: libtool version 1.5.26 (ok)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buildcheck: local copy of find_apr.m4 does not match APR's copy.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;            An updated copy of find_apr.m4 may need to be checked in.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buildcheck: local copy of PrintPath does not match APR's copy.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;           An updated copy of PrintPath may need to be checked in.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Copying libtool helper files ...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;buildconf: Using libtool.m4 at /usr/share/aclocal/libtool.m4.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Creating include/arch/unix/apr_private.h.in ...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Creating configure ...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;configure.ac:185: error: possibly undefined macro: AC_PROG_LIBTOOL&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;      If this token and others are legitimate, please use m4_pattern_allow.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;      See the Autoconf documentation.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Generating 'make' outputs ...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;apr/buildconf: 91: build/gen-build.py: not found rebuilding rpm spec file&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;apr/buildconf: 107: build/get-version.sh: not found&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;cat: ./build/rpm/apr.spec.in: No such file or directory&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;I quit trying: I want to work on my application, not have to learn THIS much about the internals of the tool I want to use... Argh! For now, I'm sticking with the Aptana support which is working (with some help from the Aptana support folks), although I do miss the ability to do quick svn commands from the shell.&lt;br /&gt;&lt;br /&gt;I think Linux needs to come up with a better installation mechanism...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-7076446320657012050?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/7076446320657012050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/interesting-svn-gotcha.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/7076446320657012050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/7076446320657012050'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2009/08/interesting-svn-gotcha.html' title='Interesting svn &quot;gotcha&quot;...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-8322418962763833728</id><published>2008-04-16T17:12:00.000-07:00</published><updated>2008-04-16T17:19:05.890-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='capistrano pty deploy'/><title type='text'>Capistrano now needs a pseudo-tty...</title><content type='html'>&lt;p&gt;I've been using Capistrano 2.x for sometime now and really like it but ran into a strange problem a couple of days ago when attempting to deploy a new version of my website.&lt;/p&gt;&lt;p&gt;I had last deployed in March of this year with no problems. Since that time I had made no changes to Capistrano (no upgrades, tweaks, etc.), but on this deploy, it failed miserably. The only indicator were numerous messages saying:&lt;/p&gt;&lt;blockquote&gt;  ** [err] stdin: is not a tty&lt;/blockquote&gt;&lt;p&gt;Sometimes it caused the command to abort and sometimes it didn't.&lt;/p&gt;&lt;p&gt;The solution was hard to find but easy to implement. Just add the following to your deploy.rb:&lt;/p&gt;&lt;blockquote&gt;default_run_options[:pty] = true&lt;/blockquote&gt;&lt;p&gt;Apparently, versions up until Cap 2.1 would always allocate a pseudo-tty (pty) for every command it ran. However, with the removal of this default in Cap 2.1, "...some commands, in certain environments" fail with no pty [so says my Rails host]. Adding this new option put my deploys back in shape.&lt;/p&gt;&lt;p&gt;I wonder why this got removed in the first place...?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-8322418962763833728?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/8322418962763833728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2008/04/capistrano-now-needs-pseudo-tty.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/8322418962763833728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/8322418962763833728'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2008/04/capistrano-now-needs-pseudo-tty.html' title='Capistrano now needs a pseudo-tty...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-695524907364724001</id><published>2007-07-19T16:41:00.001-07:00</published><updated>2007-07-19T17:04:19.649-07:00</updated><title type='text'>Capistrano on Windows client...</title><content type='html'>It was supposed to be easy: just read the &lt;a href="http://manuals.rubyonrails.org/read/book/17"&gt;Capistrano manual&lt;/a&gt; make a little magic with your deploy.rb file, and you're in business. Sounds wonderful, doesn't it? Would that it were so easy.&lt;br /&gt;&lt;br /&gt;The documentation (manual and elsewhere) makes it clear that Cap'ping to a Windows server is pretty challenging... Cap is made for *nix machines. However, I didn't find anything about a Windows client, other than the statement that "you must have an svn client installed on your machine."  I did -- RapidSVN, TortoiseSVN, and the svn client embedded in the Aptana IDE.&lt;br /&gt;&lt;br /&gt;However, once I got to actually attempting to deploy my application, it failed every time with a "no such file or directory" error message and a reference to the repository trunk itself.  No amount of hair-pulling (it was a VERY long weekend), searching the web, emailing a few contacts helped... not matter what I did, it continued to fail in exactly the same manner.  I even built a new development environment on another machine just to make sure it wasn't some brain-dead Windows issue: no dice.&lt;br /&gt;&lt;br /&gt;Tuesday night, I went to the local Ruby on Rails Meetup and got the answer from another Windows-based developer Hob Spillane -- thanks!&lt;br /&gt;&lt;br /&gt;So... drum roll please... here's how to get Cap working on your system:&lt;br /&gt;&lt;br /&gt;You MUST have the svn binaries installed on your Windows client machine and in your execution path before Cap can deploy successfully -- the GUI clients do not provide what Capistrano needs.  The binary you need depends on the version of Apache that your provider is running: 2.0 and 2.2 require different binaries.&lt;br /&gt;&lt;br /&gt;For my Apache 2.2, I went to the &lt;a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&amp;expandFolder=8100&amp;amp;folderID=8100"&gt;subversion download page&lt;/a&gt;, and clicked on the &lt;a href="http://subversion.tigris.org/files/documents/15/38212/svn-win32-1.4.4.zip"&gt;                             svn-win32-1.4.4.zip&lt;/a&gt; link, installed it in /usr/bin/svn/bin, added that directory to my PATH statement and -- voila! -- Capistrano deploys like a charm! (When I went to the download site, there was only the choice of a zip file, no setup.exe. That may change by the time you get there.)&lt;br /&gt;&lt;br /&gt;If your version is Apache 2.0, go to &lt;a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91"&gt;this download page&lt;/a&gt; and chose the appropriate setup.exe or .zip file.&lt;br /&gt;&lt;br /&gt;Nice...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-695524907364724001?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/695524907364724001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/07/capistrano-on-windows-client.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/695524907364724001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/695524907364724001'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/07/capistrano-on-windows-client.html' title='Capistrano on Windows client...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-5698685989507830699</id><published>2007-04-28T15:07:00.000-07:00</published><updated>2007-04-28T15:25:49.327-07:00</updated><title type='text'>Of presentations and security...</title><content type='html'>So... I had the chance to give a presentation to the East Bay Ruby on Rails &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Meetup&lt;/span&gt; Group (that's the Oakland part of the San Francisco Bay) about what it's like to be a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;nuby&lt;/span&gt;. Bottom line: the first step is an easy one, but after that it's a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;doozy&lt;/span&gt; (see the presentation &lt;a href="http://files.meetup.com/310796/Learning%20Ruby%20on%20Rails.pdf"&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;During the great discussion that followed, one of the group pointed out that production logging is at the :info level and that's not good -- information entered into the site is stored in clear text and therefore not as secure as it should be (people still have to hack the site, but obviously that's not good enough).&lt;br /&gt;&lt;br /&gt;So I set about closing this loophole and also getting the sessions out of file storage and into the database where they are protected via password.&lt;br /&gt;&lt;br /&gt;This should have been simple and easy, but it turned out to be really tricky: an example of things not being exactly what they seem to be.  Here's the deal.&lt;br /&gt;&lt;br /&gt;I had previously updated my environment.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;rb&lt;/span&gt; file to customize the logger, having found this code snippet at snippets.com.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;config&lt;/span&gt;.logger = Logger.new("#{RAILS_ROOT}/log/#{&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;ENV&lt;/span&gt;['RAILS_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;ENV&lt;/span&gt;']}.log",2, 131072)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For some reason I couldn't get it to work as I reported in an &lt;a href="http://nubyrubyrailstales.blogspot.com/2007/04/more-on-ruby-documentation-or-should-i.html"&gt;earlier post&lt;/a&gt;. I had finally gotten it to work (I think it may have had to do with restarting my server, but it's unclear) and life was good: I had smaller logs and didn't have to wait so long for it to load when I was doing some testing.&lt;br /&gt;&lt;br /&gt;However, what I found was that -- once this new logger was running -- I couldn't change the logging level (normally done with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;config&lt;/span&gt;.log_level in environment.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;rb&lt;/span&gt; or environments/production.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;rb&lt;/span&gt;). I wanted a logging level of :error (instead of :info) so that the operation of the site wasn't so readily stored.  I tried a number of things, including the following code in environment.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;rb&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;if &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;ENV&lt;/span&gt;['RAILS_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;ENV&lt;/span&gt;'] == 'production'&lt;br /&gt;    &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;config&lt;/span&gt;.log_level = :error&lt;br /&gt;  else&lt;br /&gt;    &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;config&lt;/span&gt;.log_level = :debug&lt;br /&gt;  end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;but that didn't work... things kept getting logged at the :info level in production -- definitely not good.&lt;br /&gt;&lt;br /&gt;I also tried setting it with config.logger.log_level = :error but that didn't seem to work either.&lt;br /&gt;&lt;br /&gt;I finally -- after much futzing around -- decided simply to remove the new Logger snippet and see if that would do the trick: and it did. Now I can set the logging level in production (in the environments/production.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;rb&lt;/span&gt; file) with a simple &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;config&lt;/span&gt;.log_level = :error.&lt;br /&gt;&lt;br /&gt;Someday I'll go back and try to understand what happened. For now, the system is operating the way I want it to and I've moved the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;config&lt;/span&gt;.logger snippet to my environments/development.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;rb&lt;/span&gt; file so that I have that capability in development where I really need it.&lt;br /&gt;&lt;br /&gt;Fortunately, the sessions question was as easy as 1-2-3:&lt;br /&gt;&lt;br /&gt;1. Run the command:&lt;br /&gt;        rake db:sessions:create&lt;br /&gt;2. Run the migration:&lt;br /&gt;        rake db:migrate&lt;br /&gt;3. Change the production.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;rb&lt;/span&gt; file:&lt;br /&gt;          config.action_controller.session_store = :active_record_store&lt;br /&gt;&lt;br /&gt;and we're in business!&lt;br /&gt;&lt;br /&gt;This is really an analogy for my experience with Rails: some of it is subtly obscure and challenging (like the Logger situation), while some of it is wonderfully intuitive and easy (like the Sessions situation).&lt;br /&gt;&lt;br /&gt;Let's hear it for more of the latter!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-5698685989507830699?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/5698685989507830699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/of-presentations-and-security.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/5698685989507830699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/5698685989507830699'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/of-presentations-and-security.html' title='Of presentations and security...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-2718587243553218248</id><published>2007-04-12T16:46:00.000-07:00</published><updated>2007-04-12T16:49:38.775-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='passwords'/><category scheme='http://www.blogger.com/atom/ns#' term='secure'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby rails nuby'/><title type='text'>Applicaton is live!</title><content type='html'>Well... I finally got the application out there, up, and running. It obviously still has much work to be done, but the basic secure functionality is there.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.4mypasswords.com"&gt;4&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;MyPasswords&lt;/span&gt; &lt;/a&gt;-- a secure well-lighted place to store you passwords and other confidential information (e.g., Frequent &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Flyer&lt;/span&gt; numbers; credit card numbers; ...)&lt;br /&gt;&lt;br /&gt;Feedback welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-2718587243553218248?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/2718587243553218248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/applicaton-is-live.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/2718587243553218248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/2718587243553218248'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/applicaton-is-live.html' title='Applicaton is live!'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-5294968290311374181</id><published>2007-04-02T15:57:00.000-07:00</published><updated>2007-04-08T11:55:42.094-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby rails nuby'/><title type='text'>More on Ruby documentation.... or should I say 'less'</title><content type='html'>Trouble finding all the documentation I need. Sure, there's the &lt;a href="http://api.rubyonrails.org/"&gt;Rails Framework site&lt;/a&gt;, which is really good for the basics, but there seem to be lots of other stuff in lots of other places, and -- so far -- I haven't found an index to the basic things.&lt;br /&gt;&lt;br /&gt;What I need is documentation on logger: the method given on &lt;a href="http://snippets.dzone.com/posts/show/979"&gt;snippets.dzone.com&lt;/a&gt; for rotating your logs doesn't work on my version of Rails (1.2.3).&lt;br /&gt;&lt;br /&gt;Finally found the logger documentation at the &lt;a href="http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/index.html"&gt;Rails stdlib &lt;/a&gt;site. And there's introductory material on the &lt;a href="http://wiki.rubyonrails.com/rails/pages/logger"&gt;Rails wiki&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-5294968290311374181?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/5294968290311374181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/more-on-ruby-documentation-or-should-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/5294968290311374181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/5294968290311374181'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/more-on-ruby-documentation-or-should-i.html' title='More on Ruby documentation.... or should I say &apos;less&apos;'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-870587469860614499</id><published>2007-04-07T06:37:00.000-07:00</published><updated>2007-04-08T11:55:25.149-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby rails nuby'/><title type='text'>Customizing Rails and rabbit holes</title><content type='html'>Some things are easy in Rails... others are definitely not!&lt;br /&gt;&lt;br /&gt;I mentioned in an earlier post that I'm using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;AjaxScaffold&lt;/span&gt; for the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;UI&lt;/span&gt;... I like the looks, there is lots of functionality, a &lt;a href="http://www.ajaxscaffold.com/"&gt;fairly active forum&lt;/a&gt;, and the author (Richard White) has been very helpful. It's a &lt;span style="font-style: italic;"&gt;great &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;plugin&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;With all that said, it's still been a challenge to get everything working that I wanted. The problem as I see it is "documentation": too much of it and not enough of it. This makes improving your expertise in Rails quite a challenge and will, IMO, keep &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;nubies&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;nubies&lt;/span&gt; for longer than I would like. Here's what I mean.&lt;br /&gt;&lt;br /&gt;On the surface, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;AjaxScaffold&lt;/span&gt; (AS) has a great deal of very good documentation. There is, for starters, the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;ajaxscaffold&lt;/span&gt;.com website mentioned above. Then there's &lt;a href="http://www.heightonepercent.com/"&gt;Richard White's home site&lt;/a&gt;, where there are a number of excellent articles describing AS. There's also Scott Rutherford's blog at &lt;a href="http://blog.caronsoftware.com/"&gt;blog.caronsoftware.com&lt;/a&gt;: Scott clearly knows AS well and also does an excellent job of writing about AS.  Finally, there's the &lt;a href="http://groups.google.com/group/ajaxscaffold/"&gt;Google Groups AS forum&lt;/a&gt;, with many fine developers working on, describing, and customizing AS.&lt;br /&gt;&lt;br /&gt;On the surface, you would think that customizing AS would be a piece of cake: just search the places mentioned above, get the relevant posts, and you're off to the races.  Well, it doesn't work that way... at least for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;nubies&lt;/span&gt;. And that's a shame because it just makes getting productive in Rails that much more difficult.&lt;br /&gt;&lt;br /&gt;Here's why the current approach doesn't work well.&lt;br /&gt;&lt;br /&gt;1. There is no single place where someone can go to learn about AS -- either for an overview or for all the details. Things are scattered all over the place. That's not to say that there aren't some great tutorials; but usually those tutorials deal with only the most basic of information. This is like many of the gee-whiz Rails videos that I've seen: you learn how to do the simplest of tasks (which are admittedly much easier than without Rails), but you don't learn how to get to the next level. The first step is easy but watch out for the next step... it's a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;doozy&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;2. Good information coexists with not-so-good information. As a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;nuby&lt;/span&gt;, you can't always tell the difference, and you can go down rabbit holes a bit too easily. Like Alice, it takes a long time to find your way back.&lt;br /&gt;&lt;br /&gt;3. Good information is incomplete. This is the "Curse of Knowledge" in action (see the book &lt;a href="http://www.amazon.com/Made-Stick-Ideas-Survive-Others/dp/1400064287/ref=pd_bbs_sr_1/104-2091242-9093537?ie=UTF8&amp;s=books&amp;amp;qid=1175954311&amp;sr=8-1"&gt;"Made to Stick" by Heath &amp;amp; Heath&lt;/a&gt;... awesome!). I found good suggestions in a couple of different places, with code samples no less, but the surrounding "..." (meaning fill in the blanks here) turned out to be the key information that I was missing.&lt;br /&gt;&lt;br /&gt;4. Information is out of date. Rails is changing and changing fast. So are the supporting tools, such as AS. On the one hand, that's really great. It's always nice to see new features being added. On the other hand, it's hard to keep up with all those changes. At some point, you may have to decide to give up on new features for some stability in your own development environment. For example, AS first appeared as a generator and then it migrated to a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;plugin&lt;/span&gt;. That's great, but how do you separate comments about the generator from comments about the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;plugin&lt;/span&gt;: it's not always clear which is which. Another rabbit hole to get lost in.&lt;br /&gt;&lt;br /&gt;5. New stuff gets added that you aren't using. Now there's a new upgrade called &lt;a href="http://www.activescaffold.com/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;ActiveScaffold&lt;/span&gt;&lt;/a&gt;. It has a lot of great new features and I'm sure that it's even better than the old &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;AjaxScaffold&lt;/span&gt;. It has a few features that I would like to have, but -- as a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;nuby&lt;/span&gt; -- I'm a little too slow at learning this stuff to just jump on the new bandwagon. So now there are comments about &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;ActiveScaffold&lt;/span&gt; that can send me down more rabbit holes. Fortunately, Richard gave this a new name and a new website, but it could (and was originally) referred to as version 4 of AS. Were that the case, I'd be in even more trouble.&lt;br /&gt;&lt;br /&gt;So what's the problem here? It's that there's no one place to go to where you can learn "all" about AS... and I'm getting the impression that this is not just an AS problem. I'd really like to see one place where there is solid, up-to-date documentation about the package and all the options, along with examples.&lt;br /&gt;&lt;br /&gt;I keep wishing for something like Perl's &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;CPAN&lt;/span&gt;, the central repository where all (or at least most) contributed Perl modules reside, and where complete documentation is supposed to (and usually does) live.&lt;br /&gt;&lt;br /&gt;So how am I doing with the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_17"&gt;customizations&lt;/span&gt; I want? I am making progress... I spent several hours digging through the code (amazing stuff, that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;AjaxScaffold&lt;/span&gt;) and I finally have the create/edit form displaying the drop-down box as desired.&lt;br /&gt;&lt;br /&gt;I still don't have it &lt;span style="font-style: italic;"&gt;saving&lt;/span&gt; the information properly, but I'm sure that's "just a little more" code-digging, rabbit-holing time to resolve and then I'll have this piece of the application up and running.&lt;br /&gt;&lt;br /&gt;BTW, if you're interested in the solution to my AS quest, I'm documenting it as I go in the forum, under the title: &lt;span id="thread_subject_site"&gt;&lt;a href="http://groups.google.com/group/ajaxscaffold/browse_thread/thread/95d2a08f331f370d/#"&gt;   Getting a drop-down to work in the create/edit form&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-870587469860614499?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/870587469860614499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/customizing-rails-and-rabbit-holes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/870587469860614499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/870587469860614499'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/customizing-rails-and-rabbit-holes.html' title='Customizing Rails and rabbit holes'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-3829732323441089463</id><published>2007-04-08T11:41:00.000-07:00</published><updated>2007-04-08T11:54:35.479-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby rails nuby'/><title type='text'>A nice plugin for secure sites...</title><content type='html'>I realize that I didn't comment about the &lt;a href="http://dev.rubyonrails.org/browser/plugins/ssl_requirement"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;ssl&lt;/span&gt;_requirement&lt;/a&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;plugin&lt;/span&gt; by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;DHH&lt;/span&gt; (David &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Heinemeier&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Hansson&lt;/span&gt;, the Rails guru) . It's really a very nice approach to requiring that certain actions be accessed only through &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;SSL&lt;/span&gt;/https and letting the other actions through. Once I found it, it was quick and easy to install and worked flawlessly.&lt;br /&gt;&lt;br /&gt;However, I couldn't use it: the fundamental controller for my application uses &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;AjaxScaffold&lt;/span&gt; (AS), which provides all the CRUD/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;UI&lt;/span&gt; stuff that I needed and allowed the customizations that I wanted (albeit with some learning curve; see a previous post).  AS uses a veritable galaxy of actions to perform its magic and there was no way (I tried) to identify the right actions individually.  What I really needed was a way to identify a &lt;span style="font-style: italic;"&gt;controller&lt;/span&gt; instead of an &lt;span style="font-style: italic;"&gt;action&lt;/span&gt; that required &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;SSL&lt;/span&gt;.  I briefly considered and then as quickly rejected the idea of attempting to enhance the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;plugin&lt;/span&gt;. It's a small plugin and seems to be pretty straight-forward in operation, but I'm just not at that level and I wanted to focus on my basic application.  Maybe another time...&lt;br /&gt;&lt;br /&gt;I did have one other question regarding the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;plugin&lt;/span&gt;. Reviewing the code, I saw that it works by trapping and then redirecting the actions that you want secured. I wonder if that might not be too much overhead for a site with lots of traffic?  I just don't know at this point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-3829732323441089463?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/3829732323441089463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/nice-plugin-for-secure-sites.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/3829732323441089463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/3829732323441089463'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/nice-plugin-for-secure-sites.html' title='A nice plugin for secure sites...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-5319280565470364663</id><published>2007-04-03T12:28:00.000-07:00</published><updated>2007-04-03T14:02:06.495-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><category scheme='http://www.blogger.com/atom/ns#' term='https'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby rails nuby DNS'/><title type='text'>Webapp security  using Secure Socket Layer (SSL)...</title><content type='html'>One of the things I want to do with my webapp is secure certain portions of it using https -- the secure mode of http communication. That requires an SSL Certificate... essentially a digital key and associated (encrypted) certificate that allows the web server and browser to encrypt and decrypt transmissions between the two [Don't ask me much more about the detailed security aspects... I am not a security expert].&lt;br /&gt;&lt;br /&gt;However, since my Rails ISP doesn't provide built-in support for SSL, I had to go get my own SSL Certificate. I also had to get my own domain name (see previous posts) because this kind of Certificate is "attached to" (associated with) a specific domain -- I can only use this certificate with stuff on this particular domain.&lt;br /&gt;&lt;br /&gt;I immediately ran into acronym hell -- things like "CSR", "RSA Key" -- and a process that was less than intuitive.&lt;br /&gt;&lt;br /&gt;First, you have to get a "&lt;a href="http://en.wikipedia.org/wiki/Certificate_signing_request"&gt;Certificate Signing Request&lt;/a&gt;" (CSR; also called a "Certification Request"), which you then send to a "&lt;a href="http://en.wikipedia.org/wiki/Certificate_authority"&gt;Certificate Authority&lt;/a&gt;" (CA; think Verisign. Thawte, and others). These folks are the keepers of the keys... the &lt;a href="http://en.wikipedia.org/wiki/Public_key_infrastructure"&gt;public key infrastructure&lt;/a&gt; keys, that is, which is nothing more than the folks who are trusted to issue cryptography keys which make secure communications possible (read "eCommerce, eBay, etc...). In essence, they electronically vouch for who you say you are.&lt;br /&gt;&lt;br /&gt;Once you have your CSR (which by the way requires that you know some of the webserver details (Apache vs IIS, which flavor of SSL is implemented in the server), then you pick your CA and submit an application. This application includes your CSR, reams of contact information, the domain name you wish to secure, and your email address (several flavors; more later on that).&lt;br /&gt;&lt;br /&gt;I searched out the various options and finally settled on &lt;a href="http://www.thawte.com/ssl-digital-certificates/ssl123/index.html"&gt;Thawte's SSL 123 certificate&lt;/a&gt;: it's tailored to securing a single domain name and was quite inexpensive: $39.95 for one year. &lt;a href="http://www.godaddy.com/gdshop/ssl/turbo.asp?isc=sslgo101ba"&gt;GoDaddy's Turbo SSL&lt;/a&gt; was cheaper ($19.95), but I thought Thawte [pun intended] had a better name. Also, Thawte gives you an online "Trusted site seal" which makes it clear that you have secured your site... something that I thought worthwhile.&lt;br /&gt;&lt;br /&gt;Once I got to this point, I figured it was all downhill from here... and it did go downhill, just not in the manner that I expected.  I did finally get my certificate and had it installed on my server, but not before I ran into a few snags. Although Thawte gives you the option of having them generate your CSR, I chose to have my ISP generate it for me.  At this point, I can't remember exactly why, but I'd most likely have Thawte do it for me now.  Here's the chronology:&lt;br /&gt;&lt;br /&gt;1. Request RailsPlayground (RP) generate the CSR for me. They did so, I submitted my application to Thawte and it was bounced:&lt;br /&gt;    "Invalid state"&lt;br /&gt;RP had put the City name into the State field and we had both missed it.&lt;br /&gt;&lt;br /&gt;2. Request RP generate the CSR for me. They did so, I submitted my application to Thawte and it was bounced:&lt;br /&gt;    "State code cannot be abbreviated"&lt;br /&gt;RP had put in CA and it had to be spelled out in full.&lt;br /&gt;&lt;br /&gt;3. Request RP generate the CSR for me. They did so, I submitted my application to Thawte and it was bounced:&lt;br /&gt;    "Invalid email address"&lt;br /&gt;It took me a few more tries until I figured out that it had to be the email address which was referenced in the domain registration system(!).  Once that was corrected, my request went thru, I was issued the certificate, and it is now installed on my site.&lt;br /&gt;&lt;br /&gt;Were I to do this all over again, I would take the simpler route and do as much as I could directly thru the Certificate Authority's website... that would have saved me some of my headaches. But you still have to dig into it and learn something about the terminology before you can make this happen.  Better yet, find an ISP that already has this baked in and save yourself some grief.&lt;br /&gt;&lt;br /&gt;I'm happy to say that now I can use https on my website.&lt;br /&gt;&lt;br /&gt;The question is how to &lt;span style="font-style: italic;"&gt;implement &lt;/span&gt;it on my website... regardless of whether a visitor types in "https://" or not, I want to secure certain actions and certain controllers, and automatically route them to use https... but that's a question for more research and another post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-5319280565470364663?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/5319280565470364663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/webapp-security-using-secure-socket.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/5319280565470364663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/5319280565470364663'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/04/webapp-security-using-secure-socket.html' title='Webapp security  using Secure Socket Layer (SSL)...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-2726113633219119729</id><published>2007-03-25T11:22:00.000-07:00</published><updated>2007-03-31T10:29:01.441-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='breakpoint debugger'/><category scheme='http://www.blogger.com/atom/ns#' term='ruby rails nuby'/><title type='text'>Dealing with the 'no breakpoint' problem...</title><content type='html'>This morning was spent trying to find a way around the "breakpoint not supported' in this release of ruby... as a nuby, I'll definitely need the debugger to help me figure out what's going on.&lt;br /&gt;&lt;br /&gt;After much searching in the forums, I found a &lt;a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/99dbc6bd331f039d/#"&gt;Google Groups thread &lt;/a&gt;that seemed to capture what I was looking for. I followed the recommendations and am a little farther along than I was before, but two hours later, I still don't have the debugger working.  Here's what I've got so far:&lt;br /&gt;&lt;br /&gt;&gt;&gt;Install the debugger package (works just fine; no indication of the problem with overlaying 1.2.2 modules presented in the thread)&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  gem install ruby-debug-base&lt;/span&gt;&lt;br /&gt;&gt;&gt;Modify the code to be debugged (Note the use of 'ruby-debug-base'; using 'ruby-debug' generates a file not found error)&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  require 'ruby-debug-base'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  Debugger.start&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  debugger&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At least this gives a clean compile, but there's no &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;breakpoint&lt;/span&gt; generated that I can see.&lt;br /&gt;&lt;br /&gt;More as I get it to work...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-2726113633219119729?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/2726113633219119729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/03/dealing-with-no-breakpoint-problem.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/2726113633219119729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/2726113633219119729'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/03/dealing-with-no-breakpoint-problem.html' title='Dealing with the &apos;no breakpoint&apos; problem...'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2958021377042600373.post-3611500389584711602</id><published>2007-03-21T15:10:00.000-07:00</published><updated>2007-03-31T10:28:21.732-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby rails nuby'/><category scheme='http://www.blogger.com/atom/ns#' term='sessions'/><title type='text'>When is a session not a session?</title><content type='html'>OK... this is strange. Rails maintains a session hash so that you can store your state.&lt;br /&gt;&lt;br /&gt;In one part of my code, I write:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;session['user_id'] = User.find_by_login(params['user_login']).id&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;logger.info "Login! - /#{session['user_id']}/,/#{session['user_login']}/"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;and that works just fine.&lt;br /&gt;&lt;br /&gt;In part of another module (a plugin which works just fine before the change), I write:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;@#{singular_name}.user_id = session['user_id']&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;and that fails with the error:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;can't convert String into Integer&lt;br /&gt;&lt;code&gt;#{RAILS_ROOT}/vendor/plugins/ajax_scaffold_plugin-3.2.4/lib/ajax_scaffold_plugin.rb:283:in `[]'&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Which says to me that it doesn't like 'user_id' as the key into the session hash, but it's acting as if it thinks session is suddenly an array...?&lt;br /&gt;&lt;br /&gt;But... the session dump shows that it's there:&lt;br /&gt;&lt;pre class="debug_dump"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;--- &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;user: !ruby/object:User &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  assets: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  attributes: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    id: "6"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    password: 8b2f204be0bad5668fd1c89f8f25b5ea4106f057&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    login: rich&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;user_login: rich&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;return-to: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;user_id: 6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;asset: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  :sort: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  :page: "1"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  :sort_direction: asc&lt;/span&gt;&lt;br /&gt;flash: !map:ActionController::Flash::FlashHash {}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Must be something automagical...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2958021377042600373-3611500389584711602?l=www.nubyrubyrailstales.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.nubyrubyrailstales.com/feeds/3611500389584711602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.nubyrubyrailstales.com/2007/03/when-is-session-not-session.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/3611500389584711602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2958021377042600373/posts/default/3611500389584711602'/><link rel='alternate' type='text/html' href='http://www.nubyrubyrailstales.com/2007/03/when-is-session-not-session.html' title='When is a session not a session?'/><author><name>JESii</name><uri>http://www.blogger.com/profile/03694926683464859622</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12638471709243827219'/></author><thr:total>0</thr:total></entry></feed>