<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Ellipsis: Category Ruby and Rails</title>
    <link>http://typo.pburkholder.com/articles/category/ruby-and-rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>...</description>
    <item>
      <title>Ruby epoch2localtime</title>
      <description>&lt;p&gt;I love it when 82 characters do a ton of work for me.&lt;/p&gt;


	&lt;p&gt;Today I&amp;#8217;m trying to debug Courier-IMAP ssl errors that are reported in the log file as &amp;#8220;DEBUG: Unexpected &lt;span class="caps"&gt;SSL&lt;/span&gt; connection shutdown&amp;#8221;.   We&amp;#8217;re using QMail  so the times in the log file are in tai64, and I&amp;#8217;m using Eric Rescorla&amp;#8217;s SSLDump:&amp;#8221;http://www.rtfm.com/ssldump/&amp;#8221; to debug the &lt;span class="caps"&gt;SSL&lt;/span&gt; traffic, which reports time in epoch seconds.  I&amp;#8217;d like to correlate the &lt;span class="caps"&gt;SSL&lt;/span&gt; traffic with the logged errors.  Here&amp;#8217;s how:&lt;/p&gt;


	&lt;p&gt;In window 1,  I monitor the QMail logs with:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
tail -f /var/log/qmail/imap4-ssl/current | tail64nlocal
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;which gives output like:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
2007-10-30 06:26:02.322254500 tcpserver: status: 30/40
2007-10-30 06:26:02.322255500 tcpserver: pid 9635 from 1.2.3.4
2007-10-30 06:26:02.322257500 tcpserver: ok 9635 buzz.example.net:10.1.1.20:993 :216.220.209.17::57693
2007-10-30 06:26:02.439369500 DEBUG: Connection, ip=[1.2.3.4]
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;In window 2, I monitor the &lt;span class="caps"&gt;SSL&lt;/span&gt; traffic with:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
sudo ssldump -e -k imap.example.com.pem  port 993 | ~/bin/epoch2local.rb
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;where the script @epoch2local.rb is:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
#!/usr/bin/ruby -p

$_.sub!(/1\d{9}/) { |t| Time.at(t.to_f).strftime("%Y-%m-%d %H:%M:%S") }
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;A quick dissection:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;ruby -p&lt;/code&gt; places your code in a &lt;code&gt;while gest; ....; print; end&lt;/code&gt; loop&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;$_&lt;/code&gt; is the current line&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;.sub!&lt;/code&gt; does in place substitution, changing the value of &lt;code&gt;$_&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;sub!(pattern) { |match| block }&lt;/code&gt; the string matting &lt;code&gt;pattern&lt;/code&gt; is passed into the {} block as the variable &lt;code&gt;match&lt;/code&gt;.  The result from the block is substituted for the original string&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;/1\d{9}/&lt;/code&gt;: assume that a 10-digit number starting with 1 is the epoch time (true for another 30 years or so)&lt;/li&gt;
		&lt;li&gt;&lt;code&gt; |t| Time.at(t.to_f).strftime("%Y-%m-%d %H:%M:%S") &lt;/code&gt;: &lt;span class="caps"&gt;PFM&lt;/span&gt;. No, not really. Pass the match into the block as &lt;code&gt;t&lt;/code&gt;.  Convert to a float, then a Time value, then format as &lt;code&gt;%Y-%m-%d %H:%M:%S&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I then get SSLDump out put as:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
23 21 2007-10-30 06:41:19.1945 (0.1309)  C&amp;gt;S  application_data
24 3  2007-10-30 06:41:19.2474 (0.1185)  S&amp;gt;C  Handshake
      Certificate
24 4  2007-10-30 06:41:19.2474 (0.0000)  S&amp;gt;C  Handshake
      ServerHelloDone  
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;And I can match up the times with the QMail logs.  Fini (although I still have the original question to resolve)&lt;/p&gt;</description>
      <pubDate>Tue, 30 Oct 2007 06:21:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:78dad476-44d2-4be1-806d-0ec2aeecc63a</guid>
      <author>Peter Burkholder</author>
      <link>http://typo.pburkholder.com/articles/2007/10/30/ruby-epoch2localtime</link>
      <category>Ruby and Rails</category>
      <category>time</category>
      <category>ruby</category>
      <category>noobie</category>
    </item>
    <item>
      <title>Ruby and syslog format string error</title>
      <description>&lt;p&gt;Here&amp;#8217;s a noobie mistake.  A daemon I have running to report on new files being uploaded to a webserver started dying on me when the filenames had a &amp;#8217;%&amp;#8217; in them.&lt;/p&gt;


	&lt;p&gt;I was doing a complete &amp;#8216;Duh!&amp;#8217; coding mistake.  Take this program:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
#!/usr/bin/ruby  -w
require 'syslog'

PROGRAM_NAME="testlog" 
LOG_FACILITY=Syslog::LOG_LOCAL2

$log=Syslog.open(PROGRAM_NAME, Syslog::LOG_PID, LOG_FACILITY)
$log.info("Starting args: " + ARGV.join(" "))

exit
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;If you run it:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;t.rb my message&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;You&amp;#8217;ll get this in the log file:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;Oct 23 08:14:06 raymond testlog[7570]: Starting args: my message &lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;However try this:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
$ .rb my "%message" 

./t.rb:11:in `info': malformed format string - %m (ArgumentError)
        from ./t.rb:11

&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;The problem is that &lt;code&gt;syslog&lt;/code&gt; interprets &amp;#8217;%&amp;#8217; in the message string as a &lt;code&gt;printf&lt;/code&gt; style format character.  That&amp;#8217;s the way of the underlying Unix library, like it or not.  And the code will barf if you try @$log.info(&amp;#8220;Starting args #{variable}&amp;#8221;).  The correct way to code is this:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;$log.info("Starting args: %s",  ARGV.join(" "))&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;and the &amp;#8217;%s&amp;#8217; gets the argument string value substituted in.&lt;/p&gt;


	&lt;p&gt;One could write here about the need to sanitize tainted input, but I won&amp;#8217;t.&lt;/p&gt;</description>
      <pubDate>Tue, 23 Oct 2007 08:09:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:e2d31bb6-3b7b-4a90-9b4e-409c10ac8bee</guid>
      <author>Peter Burkholder</author>
      <link>http://typo.pburkholder.com/articles/2007/10/23/ruby-and-syslog-format-string-error</link>
      <category>Ruby and Rails</category>
      <category>syslog</category>
    </item>
    <item>
      <title>Rails Learnings for Benefit Glorious Me</title>
      <description>&lt;p&gt;I&amp;#8217;m finally plugging away at at my first wholly-owned Rails application.  It be late, so I&amp;#8217;ll just briefly note that one can do &lt;span class="caps"&gt;SQL LIKE&lt;/span&gt; statements with MySQL semi-safely with the following snippet:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
find(  :all, 
         :conditions =&amp;gt; ["description RLIKE ?", '.*' + description + '.*'] )
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;while gets translated into the following &lt;span class="caps"&gt;SQL&lt;/span&gt;:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
SELECT * FROM waypoints WHERE (description RLIKE '.*Illinois.*') 
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;I&amp;#8217;ve not yet read the security chapter for AWDwR, so I don&amp;#8217;t know whether this is recommended or not&lt;/p&gt;


	&lt;p&gt;Note to self:  Shouldn&amp;#8217;t this be on the Rails Wiki?&lt;/p&gt;


	&lt;p&gt;_&lt;/p&gt;


	&lt;p&gt;Also, I keep getting caught with &amp;#8216;You have a nil object when you didn&amp;#8217;t expect it!
You might have expected an instance of Array&amp;#8217;, even when I was checking if an object was Nil or not.  Now I&amp;#8217;ve learned that checks like this won&amp;#8217;t work:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
if params[:waypoint][:stop].nil?
     @waypoints = []
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;because they were evaluating to something like &lt;code&gt;nil[:stop].nil?&lt;/code&gt;, which don&amp;#8217;t fly.  I now have code that does this, but it&amp;#8217;s ugly, so I need to ask around about what the proper way to do this is.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
if params.nil? || params[:waypoint].nil?
     @waypoints = []
end
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Fri, 24 Nov 2006 22:13:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:71314ae1-31db-42b9-abe5-40336ee4b23f</guid>
      <author>Peter Burkholder</author>
      <link>http://typo.pburkholder.com/articles/2006/11/24/rails-learnings-for-benefit-glorious-me</link>
      <category>Ruby and Rails</category>
      <trackback:ping>http://typo.pburkholder.com/articles/trackback/910</trackback:ping>
    </item>
    <item>
      <title>Ruby MySQL bindings for Intel Macs</title>
      <description>&lt;p&gt;Stefan Saasen points out &lt;a href="http://www.juretta.com/log/2006/10/13/ruby_installing_ruby_mysql_driver_on_intel_macs/"&gt;that the Ruby MySQL bindings are broken on Intel Macs&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s my version of the fix:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
sudo gem install mysql -- --include=/opt/local
# select option 2 for Ruby 2.7, it will fail to build
cd /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7
sudo ruby extconf.rb install mysql -- --with-mysql-dir=/opt/local
vim mysql.c
# now here's where you add the line '#define ulong unsigned long' 
# just before the line '#define MYSQL_RUBY_VERSION...'
sudo make
sudo make install
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Fri, 17 Nov 2006 14:47:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:a8bd6045-5d25-4dd9-ae1c-1a2bdb356410</guid>
      <author>Peter Burkholder</author>
      <link>http://typo.pburkholder.com/articles/2006/11/17/ruby-mysql-bindings-for-intel-macs</link>
      <category>Ruby and Rails</category>
      <category>ruby</category>
      <category>mysql</category>
      <category>macosx</category>
      <trackback:ping>http://typo.pburkholder.com/articles/trackback/907</trackback:ping>
    </item>
    <item>
      <title>Installing Rails on Mac OS X with MacPort</title>
      <description>&lt;p&gt;Yesterday I installed Ruby on Rails on my new(-ish) Intel MacBook.   Last time around I built with a combination of &lt;a href="http://fink.sourceforge.net"&gt;Fink packages&lt;/a&gt; and hand-built applications following &lt;a href="http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger"&gt;this posting at Hivelogic&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;This time around I&amp;#8217;ve been using &lt;a href="http://www.macports.org"&gt;MacPorts&lt;/a&gt;, and it&amp;#8217;s making my life much easier.   &lt;a href="http://www.evanweaver.com"&gt;Evan Weaver&lt;/a&gt; got me started with &lt;a href="http://blog.evanweaver.com/articles/2006/06/26/building-ruby-rails-lighttpd-mysql-and-postgres-on-os-x-tiger"&gt;his post on building ruby, rails and associated pieces&lt;/a&gt;, but enough has changed changed since June 26 to merit my own updated take on the process.&lt;/p&gt;


	&lt;h2&gt;Getting started&lt;/h2&gt;


	&lt;p&gt;As Evan notes, &amp;#8220;First, install the Apple Xcode tools from your &lt;span class="caps"&gt;OS X&lt;/span&gt; installation disc&amp;#8221;.  Please do so.&lt;/p&gt;


	&lt;p&gt;Next, install a recent version of &amp;#8220;MacPorts&amp;#8221; (what used to be known as DarwinPorts) from their Subversion respository.  Installing from a .dmg file is easiest, then you can let MacPorts upgrade itself later on.   As of this writing, Ports 1.3.2 is out, but disk images are only available for 1.3.1, e.g. at &lt;a href="http://svn.macosforge.org/repository/macports/downloads/DarwinPorts-1.3.1/DarwinPorts-1.3.1-10.4.dmg"&gt;DarwinPorts-1.3.1-10.4.dmg&lt;/a&gt;&lt;/p&gt;


Next, you&amp;#8217;ll want to update your executable path so the Ports installations in /opt/local are found before your Apple binaries.  You should edit both &lt;code&gt;/etc/profile&lt;/code&gt; and your &lt;code&gt;~/.bashrc&lt;/code&gt; (or equivalent if you&amp;#8217;re using some other shell.  Your path should end up looking something like this:
&lt;pre&gt;
&lt;code&gt;
PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin" 
&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Install the ports&lt;/h2&gt;


	&lt;p&gt;Now open a terminal (&lt;code&gt;/Applications/Utilities/Terminal&lt;/code&gt;) and run the following:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
sudo port -d selfupdate 
sudo port install lighttpd +ssl 
sudo port install rb-rubygems
sudo port install rb-fcgi
sudo port install mysql4 +server
&lt;/pre&gt;&lt;/code&gt;

	&lt;h2&gt;Set up MySQL&lt;/h2&gt;


	&lt;p&gt;You&amp;#8217;ll also need to get mysql4 set up with these commands:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
# set up the mysql database:
sudo -u mysql mysql_install_db
# start the server:
sudo /opt/local/bin/mysqld_safe --user=mysql
# set the root password (picking your own password, of course)
/opt/local/bin/mysqladmin -u root password newpassword
&lt;/pre&gt;&lt;/code&gt;

	&lt;p&gt;If you want Launcher to start MySQL automatically on reboot, you can run the following:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
sudo launchclt load -w  \
  /Library/LaunchDaemons/org.macports.mysql4.plist
# stop the server
sudo launchctl stop org.macports.mysql4
# start the server
sudo launchctl start org.macports.mysql4
&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Install the gems&lt;/h2&gt;


	&lt;p&gt;Running gems with the &amp;#8216;-y&amp;#8217; option automatically takes care of prerequisites&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
sudo gem install -y rails
sudo gem install -y capistrano
&lt;/pre&gt;&lt;/code&gt;

	&lt;h2&gt;Test!&lt;/h2&gt;


	&lt;p&gt;First, are you hitting the right version of Ruby?  &lt;code&gt;ruby --version&lt;/code&gt; should return something like &lt;code&gt;ruby 1.8.5 (2006-08-25) [i686-darwin8.8.1]&lt;/code&gt; &lt;strong&gt;not this&lt;/strong&gt;: &lt;code&gt;ruby 1.8.2 (2004-12-25) [universal-darwin8.0]&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Next, can you build a Rails application with&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
cd ~/tmp
rails widgetapp
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Okay?  Good.  Now let&amp;#8217;s &lt;code&gt;cd widgetapp&lt;/code&gt; and put the database through it&amp;#8217;s paces.  Save the following code as &lt;code&gt;test_rails_db.sh&lt;/code&gt; (or &lt;a href="/files/testdb.sh"&gt;download it here&lt;/a&gt;)&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
#!/bin/sh

echo -n "Enter MySQL root password: " 
read PASSWD

mysqladmin -u root -p$PASSWD create widgetapp_development

cat &amp;gt;db/create.sql &amp;lt;&amp;lt;EOF
DROP table if exists widgets;

CREATE table widgets (
    id  int not null    auto_increment,
    name    varchar(40)  not null,
    description   varchar(100)   not null,
    primary key (id)
    );

INSERT INTO widgets (name, description) VALUES ("Tool", "Useful item");
INSERT INTO widgets (name, description) VALUES ("Food", "Tasty stuff");

EOF

mysql -u root -p$PASSWD  widgetapp_development &amp;lt; db/create.sql

mv config/database.yml config/database.yml.dist

cat &amp;gt;config/database.yml &amp;lt;&amp;lt;EOF 

development:
  adapter: mysql
  database: widgetapp_development
  username: root
  password: $PASSWD
  socket: /opt/local/var/run/mysqld/mysqld.sock

EOF
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;and run &lt;code&gt;sh ./test_rails_db.sh&lt;/code&gt;.  Enter your password when prompted.&lt;/p&gt;


	&lt;p&gt;Now the proof is in the pudding.  If the following run s while you&amp;#8217;re in your &lt;code&gt;widgetapp&lt;/code&gt; rails directory, you&amp;#8217;re golden:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
script/generate scaffold Widget
script/server
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now browse to &lt;a href="http://0.0.0.0:3000/widgets/list"&gt;http://0.0.0.0:3000/widgets/list&lt;/a&gt; and you should utter a little gasp of joy.&lt;/p&gt;</description>
      <pubDate>Fri, 17 Nov 2006 13:08:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:3848e11a-8a2a-44c9-b8df-2f3ad2903c13</guid>
      <author>Peter Burkholder</author>
      <link>http://typo.pburkholder.com/articles/2006/11/17/installing-rails-on-mac-os-x-with-macport</link>
      <category>System Administration</category>
      <category>Ruby and Rails</category>
      <category>ruby</category>
      <category>rails</category>
      <category>lighttpd</category>
      <category>mysql</category>
      <category>macports</category>
      <category>darwin</category>
      <category>darwinports</category>
      <category>macosx</category>
      <enclosure type="application/x-sh" length="800" url="http://typo.pburkholder.com/files/testdb.sh"/>
      <trackback:ping>http://typo.pburkholder.com/articles/trackback/886</trackback:ping>
    </item>
    <item>
      <title>Wikis, Blogs, and CMS's: Beyond the Classroom</title>
      <description>&lt;p&gt;Today I interviewed for a position with &lt;a href="http://www.oit.umd.edu"&gt;University of Maryland Office of Information Technology&lt;/a&gt; and the &lt;a href="http://www.chem.umd.edu"&gt;University&amp;#8217;s College of Chemical and Life Sciences&lt;/a&gt;.  As part of the interview process I was able to do a short presentation, and I chose to provide an overview of the web content management systems (wikis, blogs, cms&amp;#8217;s and backpack) that I&amp;#8217;ve worked with, and the role I think they can play in a univeristy environment beyond the strictly instructional.&lt;/p&gt;


	&lt;p&gt;Some of the resources I referenced in the talk are:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.wikipedia.org"&gt;Wikipedia&lt;/a&gt; (of course)&lt;/li&gt;
		&lt;li&gt;the wikis hosted at &lt;a href="http://swiki.dlese.org"&gt;swiki.dlese.org&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.realclimate.org"&gt;RealClimate.org&lt;/a&gt;, an excellent blog on climate science&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://itc.smm.org/buzz"&gt;Buzz&lt;/a&gt;, the science blog and the Science Museum of Minnesota&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://bzst.blogspot.com"&gt;&lt;span class="caps"&gt;BZST&lt;/span&gt;&lt;/a&gt;, a blog by UMd Professor Galit Shmueli&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://plone.org"&gt;Plone&lt;/a&gt;, the Zope-based &lt;span class="caps"&gt;CMS&lt;/span&gt;&lt;/li&gt;
		&lt;li&gt;the Plone sites hosted at &lt;a href="http://www.dlese.org/cms/"&gt;www.dlese.org&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;the Joomla sites at the College of Chemistry and Life Sciences, the &lt;a href="http://www.chem.umd.edu/gso"&gt;Graduate Students&amp;#8217; Organization&lt;/a&gt; and the &lt;a href="http://www.chem.umd.edu/groups/doyle"&gt;Doyle Research Group&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.37signals.com"&gt;37Signals&lt;/a&gt;, the web app development group responsible for &lt;a href="http://www.rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; and &lt;a href="http://gettingreal.37signals.com"&gt;Getting Real&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://backpackit.com"&gt;Backpack&lt;/a&gt; the place to put all your stuff, also from &amp;#8220;37Signals&amp;#8221;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Lastly, one can download &lt;a href="/files/UMd_Presentation.pdf"&gt;the &lt;span class="caps"&gt;PDF&lt;/span&gt; version of my presentation&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 26 Oct 2006 13:51:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:e0924269-cfe1-40a3-a49f-f4e04baf2734</guid>
      <author>Peter Burkholder</author>
      <link>http://typo.pburkholder.com/articles/2006/10/26/wiki-blog-and-cmss-beyond-the-classroom</link>
      <category>System Administration</category>
      <category>Web Development</category>
      <category>Ruby and Rails</category>
      <enclosure type="application/pdf" length="2494837" url="http://typo.pburkholder.com/files/UMd_Presentation.pdf"/>
      <trackback:ping>http://typo.pburkholder.com/articles/trackback/22</trackback:ping>
    </item>
    <item>
      <title>Typo is up and running</title>
      <description>&lt;p&gt;My life is exciting enough that I could spend Friday evening working on my resurrected site.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;d intended to document the experience well enough that I could update the various wikis on Typo+Dreamhost, but it got so late that my brain was too fried to do anything but randomly edit previous commands in the hope that something would work.  I love to tinker around at night, but my brain stalls out a lot earlier than it used to.&lt;/p&gt;


	&lt;p&gt;The main sticking points I ran into were:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt; The &lt;span class="caps"&gt;SVN&lt;/span&gt; checkout of the Rails1.1 typ version took about two bowls of cereal to complete&lt;/li&gt;
		&lt;li&gt; The rake migration calls do nothing&amp;#8212;I never timed them but after about 5 minutes I start hitting Ctlr-C.  I didn&amp;#8217;t dig into the strace of rake too deeply, but just set up the databases from within the mysql client with &amp;#8216;source db/schema.mysql.sql&amp;#8217;&lt;/li&gt;
		&lt;li&gt; I was getting mysql server not found errors&amp;#8212;because I had a &lt;span class="caps"&gt;TAB&lt;/span&gt; character after my hostname in my database.yml file.  Why are computers so damn literal?&lt;/li&gt;
		&lt;li&gt; I was getting 500 server errors, so I applied the RailsFCGIHandler tweak from &lt;a href="http://work.alexyoung.org/archives/102/dreamhost-and-rails-500-errors"&gt;Alex Young&amp;#8217;s Blog&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Of these, only the rake problems merit documenting on a Wiki&amp;#8212;and I&amp;#8217;ve done so at &lt;a href="http://www.typosphere.org/trac/wiki/DreamHost"&gt;Typo Trac Wiki&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 24 Jul 2006 11:07:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:49711541-fa5f-4936-b35c-3b76201c35bb</guid>
      <author>Peter Burkholder</author>
      <link>http://typo.pburkholder.com/articles/2006/07/24/typo-is-up-and-running</link>
      <category>Web Development</category>
      <category>Ruby and Rails</category>
      <trackback:ping>http://typo.pburkholder.com/articles/trackback/1</trackback:ping>
    </item>
  </channel>
</rss>
