Bug #59269 in lighttpd (Ubuntu): “lighttpd fails to restart during logrotate script”

I had my first Ubuntu bug report confirmed and fixed by the Ubuntu team. The bug I encountered kept Lighty from coming back up when being restarted. Since the default logrotate scripts had Lighty restarting every night, this bug hit my Rails apps quite often. Extending the logrotate script’s rotate frequency helped, and I was about to install Monnit, but now it looks like I can skip that knowing the restart bug has been fixed. Hooray for well managed open source projects.

Ruby on Rails on Ubuntu Edgy

I updated my laptop to Ubuntu 6.10 Beta (Edgy Eft) and it’s working great. So far I’ve had less problems than the beta of Dapper, but it has only been two day. My first experience off the tested path of synaptic packages is ruby on rails. Edgy comes with a rails package, but like Dapper, no gems. So here is the install of gems, and the rails from withing gems, on Ubuntu 6.10 Edgy Eft.

# sudo apt-get install ruby ruby1.8-dev irb rdoc
# wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
# tar xvfz rubygems-0.9.0.tgz
# cd rubygems-0.9.0
# sudo ruby setup.rb
# sudo gem install rails

I did get an rdoc error, but everything else installed fine, so I ignored it and continued on. This error is fixed by adding rdoc to the apt-get command above. It is here for historical purposes, and perhaps will help someone.

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’: no such file to load — rdoc/rdoc (LoadError)

Other Notes:

Create the Perfect Rails Server in 15 Minutes

I recently noticed that the next release of Ubuntu Linux will be one nice Ruby on Rails platform. After their last update of Rails itself, which brought the version number up from 1.0 to 1.1.2, Ubuntu 6.06 LTS now has all the current Rails tech built in. There is no need to search the web for all the pieces and compile package after package until finding one that works. Here are the highlights:

  • Rails 1.1.2
  • Lighttpd 1.4.11
  • MySQL 5.0.21 or 4.1.15
  • Ruby 1.8.4
  • Ruby-FCGI 0.8.6
  • Ruby-MySQL 2.7

This means that after a 10 minute server install of Ubuntu, one can uncomment the universe repo in /etc/apt/sources.list and issue the following command to setup at capable and competent Rails server environment:

sudo apt-get install ruby1.8 mysql-server rails lighttpd libmysql-ruby1.8 libfcgi-ruby1.8

Then copy your Rails app over and configure it in Lightty you’re off. Now to find a hosting company which supports Ubuntu…

Update: Rubygems can be useful, but it isn’t in the standard repos. Instead, I downloaded and compiled rubygems-0.9.0.tgz.

Update2: I removed the Ubuntu-supplied rails and instead used rails from rubygems.

New MySQL, new FrozenTech

I felt good about my current state of the RoR FrozenTech Store so I decided to roll it out tonight. I quickly realized I would have to upgrade my MySQL from 4.0 to 4.1, something I had been putting off for a while. I followed the Gentoo upgrade docs, and they worked perfectly, but it did take over an hour to compile the new version plus all the other stuff which depened on it. That was fine though, as Christina and I watched some episodes of Battlestar from season one which we had not seen.

After everything was done compiling, I restored all the databases, checked existing sites, uploaded new files, edited apache and lighttpd config files, and restarted every service a few times. The good news is that everything looks like it’s working the way it should. There’s still a lot of tweaking that need to be done to the store and the surrounding site, but I’m looking forward to it. The Ruby on Rails environment has been fun to work with.

Rails on Lighttpd with Apache!

After struggling all day yesterday, I finally got my typo installs going on Lighttpd with Apache passthough. I think it was the virtual server aspect that kept messing me up, but after 4 hours yesterday, I somehow got it going after 30 seconds of work this morning.

Typo feels much faster now than when it was running on plain Apache2 + FCGI.