• It’s Over

    There will be no more cooking or cleaning at my house for the foreseeable future. I just finished removing the sink. It’s somewhat depressing thinking about how much more work I have to do.

  • Pathetic

    Yesterday was the annual Run for Hope that I’ve been doing the past few years. This year, as usual, I was racing my now 13-year old nephew Jack. He beat me last year by seven minutes and my goal was to get that down to five this year.

  • My Saturday

    I offered to drive my Mom and my aunt anywhere they wanted. They chose to go to Bohemia National Cemetery. It didn’t take too long and we found what we were looking for.

  • An Accident

    I have had two snakes (that I’ve seen) in my backyard for as long as I’ve owned my house. For the most part, they can do whatever they want back there and I don’t care. I usually only see them when I’m cutting the grass and they quickly slide away. Today, the grass was a little taller and I didn’t see one of them and I think I killed him. I feel pretty bad about this.

  • Ruby Dates

    In one of my apps, the price of registration for an event goes up after a particular date. So I have to check if today’s date is after the given date. Here’s how I’ll do this:

  • A Little Bit More

    Had to fill my garbage cans again, so I took out a cabinet. Now I need to put a valve on my gas line, so I can disconnect the stove. And then it will be time to get rid of the sink. At that point, I’ll be sad because washing dishes will be a pain. (I’m thinking I’ll just go and buy paper plates and cups.)

  • A Fun Vacation

    I signed up to the Five Boro Bike Tour in NYC over last weekend. I took my folding bike on Amtrak and it was a pretty good trip. It would have been great, but Amtrak is definitely not the way to travel. (Next time I want to go somewhere on a train, I first need to go to Europe.) As this was my first vacation in a while, I was very much looking forward to it.

  • Little vim tricks

    Our datalogger saves files in a windows format, which means when I open it in a unix program, I don’t see any line feeds. The quick solution to this is to open the file in vim and run:

  • Little More Work

    I took the morning and tried to take down a bit more of the wall in the kitchen. It was nice being able to stand on the counter to reach the high parts. Here’s how things look now.

  • Libv8 Gem Problems

    I had some problems installing the libv8 gem after installing ruby 2.0. The solution was to use yum to install the python26 packages and then make a link from them to /usr/local/bin/python. After that the gem install libv8 command worked.

  • Requiring https

    My apps tend to just be electronic sign-up sheets for various events. There’s no way we’re going to pay for an SSL certificate for a site that will probably be up for a month or two, at most. However, we do require people administering the page to login, which means passwords which need to be encrypted. That’s really all I care about encrypting, not the entire site. So, my somewhat simple solution is:

  • More Capistrano

    Capistrano used to have a pair of tasks called deploy:web:disable and deploy:web:enable that I really liked. All they basically did was to upload a file to the webserver that would be displayed while a new version was deploying. I thought this was really helpful because if anyone visited the site during the deployment, they’d see the message that the site was under maintenance. Without this file, visitors to the site would see a cryptic rails rack error that made no sense. Sometime last year, after a capistrano update, I realized that these tasks were no longer there. By that time, I had understood that it was just uploading a file, so I could duplicate the tasks manually by editing a file to add the current time and then uploading it to the webserver. (In either case, I had to modify my httpd.conf file to reflect the location of the file.) Then, after the update, I’d remove the file. This wasn’t difficult, but it was WAY easier to do this:

  • Spoke Too Soon

    When I came home from work, I was feeling a little full of myself and then I wrote my previous blog post. I spent the past couple of hours watching some Railscasts that were really informative, on using capistrano to do all sorts of things. So I changed my capistrano file quite a bit and do feel that I understand it a bit more.

  • Advancing

    Today, I started a new ruby on rails website for a workshop. It’s a very basic site that just handles registrations and redirects people to the credit card processor that we use. This is the main type of website that I write in rails and it’s probably my tenth site that I’ve written for this purpose. Previously, I had always used scaffolding in rails and then deleted the stuff that I didn’t need. This time, I made a conscious choice to not use any scaffolding and instead generate my own controllers and models. I’m happy to say that I didn’t have any real problems. So I’m thinking that I’m no longer a complete beginner with rails. I might even go so far as to say I’m an intermediate rails programmer. Which means it’s time for me to start advancing some more. I found this website http://learn.thoughtbot.com and was thinking of signing up for the prime program. The intermediate ruby on rails workshop looks pretty interesting. Though, after reading the syllabus, I’m thinking that perhaps I was at intermediate level a while ago. In the listing of things that they plan to cover, I already know a few:

  • Little Work

    My organizing kick really tired me out. I slept for a very long time and didn’t feel like doing anything today. But I felt I should do something today, so I decided to just finish taking the drywall off the back of the kitchen. It didn’t take long, but since I was already tired, it pretty much finished me for the day.

  • Organizing Kick

    Since I was doing a bit of organizing at work this week, it has carried over to my house. This is not a mood I’m usually in, so I decided to take advantage of it and do a little work on my basement. My basement needs a lot of work, so this put a very small dent into it. I’d say I cleaned up about a quarter of the basement. And I’m pretty happy with that.

  • A Few Good Hours

    I woke up and decided I better get started. So, down came the upper cabinets, except for the one with the vent going outside. I’ll do that later.

  • It Begins Again

    It’s March and I’ve finally saved up enough (I hope), so I started work on my kitchen. Here’s a shot of the first two cabinets I took down.

  • RHEL6 No graphics, error: could not open default font ‘fixed’–SOLVED

    After some updates from RHEL6, some users were having problems with X not starting. Looking at the log file, I saw this error:

  • Ruby 2.0 with Other Versions

    Ruby 2.0.0 came out today and I thought I’d install it. I had been using rvm to handle my multiple versions of ruby, but when I tried to do a rvm install 2.0.0, I got a bunch of errors about homebrew. It seems as though homebrew is now required. This is a problem for me because I’ve been using MacPorts for years and I just don’t feel like switching right now. So, I figured that I’d just see if I could compile it myself by hand and come up with a way to have multiple versions of ruby. The thing is, I really don’t switch between versions all that much. I will now, as I slowly convert all the sites I have to 2.0. So I’ll need to go back and forth a little. But once it’s done, I probably won’t switch for a long time. I’ve been on 1.9.3 for a very long time and it worked fine. Anyway, I’m not exactly sure how I’ll do this, but I’m going to give it a try.

  • More Ruby Notes

    I just found out that these two ruby commands do the same thing.

  • Rails3 form_for vs form_tag

    I’ve been advancing a little in my rails work, to the point where I’m making more elaborate forms. So I’ve had to switch to using form_tag instead of the form_for that’s the default when you use scaffolding. I have a pretty good understanding of the differences now, so I’m documenting it here.

  • Sendmail on Mac OS X 10.8

    I wanted to use sendmail to test the sending of some messages in one of my apps. The command I wanted to run was:

  • Ruby File Open Options

    I spent a little time looking for this info, so I thought I’d post it here. Use it like this:

  • Drop a Column in MySQL Table

    For some reason, my migration file wouldn’t drop a column when I tried to go back to an earlier version. I fixed this by just going into mysql and dropping the table manually.