December 30, 2005

Posted by sethbc on December 30, 2005

I crashed at Evan’s again last night. We went out to Rock Bottom and watched a movie called 25th hour. Not the worst movie I’ve ever seen, but it was definitely a little slow to get started. Kind of an introspective flick. Spike Lee made a good flick though. He definitely was able to capture both the relationships and the feelings on screen.

I was contemplating picking up Evan’s girlfriend from the airport with him, but I decided to go to Best Buy to pick up some accessories for my camera. I ended up getting a 4GB CF drive really cheap (which i’ll probably use for RAW+JPEG), a 1GB Ultra II Samsung (for JPEG), and a card reader for my mac. The card reader is actually a little ridiculous — it must support every kind of flash I’ve ever seen.

Other than that, today has been kind of a dull day, except for the WWF-style smack-down I laid on the customer service representatives at Amazon. I was supposed to get my camera today, but of course all I got was the lens. Go figure! Anyway, it’ll be here on Tuesday, and they gave me a bit of a discount and didn’t make me pay for the shipping. Dinner tonight was at Circle Sushi. The tuna tonight was absolutely incredible.

Say Yes from the album “Either/Or” by Elliott Smith

Movies

Posted by sethbc on December 30, 2005

There is absolutely no movie out worth seeing right now. I mean, King Kong I saw, but it just wasn’t that great a flick. Way too long. We were thinking of going to see Naria, but I’m not sure that I’m really all that interested in it.

Evan and I went to Blockbuster, and there was nothing there either. I’m telling you, I was out of the country for four months, and nothing came out that looks appealing. When I’m at Best Buy tomorrow, I’ll probably pick up Batman Begins, Sahara and the last of the three Star Wars.

On a different note, I ordered a Digital Rebel XT, and it should be here tomorrow. I hope Amazon isn’t lying to me on the delivery time! I’ll probably go on a little photography expedition tomorrow, after I get my memory card that is. I’ll post a review of it a little later.

Typo Bugs

Posted by sethbc on December 29, 2005

So I’ve been diving into the source code for Typo, checking out several of the Trac entries, and looking to fix some bugs. My RSS feeds weren’t working quite right, so I had to change the routes.rb entry for xml/rss. I needed to tack :format => ‘rss20′ on the end there, then everything worked fine. There are some rumblings that there’s trouble constructing the ping to Technorati, and I’m going to take a look at that too.

Dinner and Cards

Posted by sethbc on December 29, 2005

Last night I went out to dinner with Holly, my best friend from kindergarten. We ended up going to the California Pizza Kitchen, and then out to Starbucks for a cup of coffee. Believe it or not, I actually ordered a plain coffee!

Post-Coffee I went down to midtown to hang out with Evan and Joey, and one of Evan’s friends from Tech came down and played some cards with us. All in all, a pretty successful night.

Last night I finished “It’s not about the bike.” All-in-all it wasn’t a bad book. The writing style was terse, and in some places repetitive, but I enjoyed the read. It gave an interesting perspective on the mentality of a cancer patient (both pre- and post-treatment).

Family Portrait

Posted by sethbc on December 28, 2005

Let me just say that getting the family portrait taken wasn’t nearly as painful as I expected it to be. Of course, there was the usual “Stand up straight but look relaxed,” “Tilt your head and lower your chin,” etc. etc. But for all intents and purposes, it wasn’t terrible. Near the end, Ben got a low blood sugar and started getting a little testy, but it wasn’t that bad.

After the pictures, we went out to an Irish place near where we live. The food was absolutely excellent, though the service could have used a tad bit of work.

Dinner

Posted by sethbc on December 28, 2005

As it turns out, Elliot and Ben joined us for dinner! We went out to El Azteca, and had a nice little Mexican dinner.

Well, we have a family portrait scheduled in 12 hours, so I’m going to get some sleep now. I guess my mom wanted some pictures of me after the weight loss :-)

Dinner Tonight

Posted by sethbc on December 27, 2005

I’m going out to dinner tonight with Joey and Evan. My oh my. The more things change, the more they stay the same!

iPhoto to IPTC

Posted by sethbc on December 27, 2005

Apparently the smugmug uploader doesn’t support copying the iPhoto captions to the standard exif/IPTC data fields, so I’m going through and doing it manually with CaptionBuddy (which is available from apple’s iPhoto website).

I’m actually kind of wondering if PictureSync supports this stuff. Maybe I’ll just use that. Unfortunately though, PictureSync doesn’t have the iPhoto support that I’d hoped for, because I can’t just choose to upload specific albums.

Oh well.

New Blog…

Posted by sethbc on December 26, 2005

Well for about the 4th time in the last year, I’ve migrated my blog again. This time though, i’ve migrated it back to my server, using typo as the platform. This should hold for a while :-)

Ubuntu, Rails, Typo and Apache2 3

Posted by sethbc on December 25, 2005

I know dapper is in pre-release right now, but I decided to go ahead and get flight2 up and running, and document my experience installing Typo from scratch.

This install basically requires 2 steps, only one of which I’m going to document. The first step, is installing Ubuntu Dapper Flight 2, and this is up to you. These instructions will almost certainly work with Breezy, and possibly some of the older versions of Ubuntu. As far as Debian is concerned, I have no idea whether or not this will work, so YMMV.

Ubuntu Repository Data

First and foremost, in order to have a working Rails install, we’re going to need to enable the universe repository.

Open /etc/apt/sources.list, and make sure to uncomment the lines for the universe repository.

Ruby

As rails is written in Ruby, you need to install a working ruby environment with all the bells and whistles!

sudo apt-get install ruby irb irb1.8  libdbm-ruby1.8 libfcgi-ruby1.8 libfcgi0 libgdbm-ruby1.8 libopenssl-ruby1.8 libruby1.8-dbg ri ri1.8 ruby1.8-dev
	

RubyGems

Because ubuntu doesn’t include rubygems in their repository, you have to install rubygems from source. Fortunately, this isn’t a very complicated installation method, and rubygems has a mechanism to insure it stays up to date outside of APT.

wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
tar zxvf rubygems-0.8.11.tgz
cd rubygems-0.8.11
sudo ruby1.8 setup.rb
	

As of this writing, Rubygems-0.8.11 was the most current version of rubygems, but you might want to make sure that rubygems is up to date with this command: sudo gem install rubygems-update

Installing Mysql

Typo doesn’t require MySQL, but that’s the database that I use to host my blog. To install MySQL, we simply:

sudo apt-get install mysql-common libmysqlclient12 libmysqlclient12-dev mysql-server libmysql-ruby1.8
	

I know that libmysql-ruby1.8 installs the mysql ruby bindings, but in order to make sure I have the most updated bindings, I run:

sudo gem install mysql -y
	

Installing Rails

sudo gem install rails -y
	

Installing Apache2 with fastcgi bindings

sudo apt-get install apache2 libapache2-mod-fcgid
sudo a2enmod fcgid
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
	

Build Essential

Technically, the build-essential packages aren’t necessary, as there are fcgi libraries in Ubuntu, but I always install them anyway. You never know when you’re going to need this stuff

sudo apt-get install build-essential
	

At this point, rails should be installed and functioning.

FastCGI

There are two ways to go about installing FastCGI support, one through APT, the other directly from source.

apt-get install libfcgi-dev
sudo gem install fcgi

Other Modules

There are a number of useful gems that one can install, and installation is a snap with Rubygems.

Say for example you want to install the flickr interface. You’d simply type

sudo gem install flickr -y

and the gem is automagically installed.

Installing Typo

I’m installing typo from the SVN repository, as I find that the code isn’t too ‘bleeding edge,’ and staying current generally has more benefits than drawbacks. In order to check out the code, I went to the

/var/www/

directory, and typed

svn checkout svn://leetsoft.com/typo/trunk typo

Typo is now installed on the machine, but we first have to create the database, add the typo host, and then make some changes in order to ensure that the proper page is displayed.

Creating the typo database is a fairly simple procedure. Use mysqladmin to create the databases like this:

mysqladmin -u root -p create typo_dev
mysqladmin -u root -p create typo_tests
	

Optionally, you can create a separate database for production usage as well. Then import the database schema like so:

cd /var/www/typo/db
mysql -u root -p typo_dev < schema.mysql-v3.sql

Finally you need to edit the

config/database.yml

file. Mine is set up as follows:

login: &login
  adapter: mysql
  host: localhost
  username: root
  password: ROOT_PASSWORD

development:
  database: typo_dev
  <<: *login

test:
  database: typo_tests
  <<: *login

production:
  database: typo_dev
  <<: *login
	

I created my own vhost for typo. I created a file called

typo

in

/etc/apache2/sites-available

. For the contents of the file i included the following:

NameVirtualHost *
<VirtualHost *>
    ServerName sethbc.org
    DocumentRoot /var/www/typo/public/
    ErrorLog /var/log/apache2/error.log
    LogLevel warn

    CustomLog /var/log/apache2/typo.log combined

   <Directory /var/www/typo/public/>
      Options ExecCGI FollowSymLinks
      AddHandler cgi-script .cgi
      AllowOverride all
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>

After creating the vhost, make sure to restart apache with

sudo /etc/init.d/apache2 restart

.

The next step in the installation is modifying typo to work properly with the default Ubuntu fcgid handler. In order to do this, open the

.htaccess

file in the public directory of your typo installation, and change

AddHandler fastcgi-script .fcgi

to

AddHandler fcgid-script .fcgi

What else can you do?

I’m planning on writing another one of these, with the aim of getting lighttpd running on ubuntu. As of right now, there is a request for inclusion of lighttpd in Ubuntu, and I’m under the impression that it is now approved for debian, so that should speed the process up somewhat.

Resources

Ruby, Rails, Apache 2 and Ubuntu Breezy (5.10) — http://fo64.com/articles/2005/10/20/rails-on-breezy

RailsOnUbuntuDebianTestingAndUnstable — http://wiki.rubyonrails.com/rails/pages/RailsOnUbuntuDebianTestingAndUnstable

How to install Ruby on Rails on Ubuntu 5.10 — http://claudio.cicali.org/article/74/how-to-install-ruby-on-rails-on-ubuntu-510