Posts Tagged ‘rails’

mod_rails && apache || mongrel && nginx

April 3rd, 2009

Switch…

That’s all I have to say. Passenger/mod_rails is so much faster and more competent at serving my crappy RoR code than my hacked together mongrel/nginx scheme that I had before.

My ram usage spikes much more when visitors hit the site, but never starts swapping. The increased ram usage is more than worth it for the HUGELY increased speed that I’m seeing by the dynamic mongrel management.

Even better, when the visitors leave (as often happens), the ram usage settles down to the same place it did with my nginx and mongrel combo.

Enjoy the increased speed and stability AMDavidson.com visitors.

Gem issues with Passenger

March 31st, 2009

I was ignorantly happily letting my gems be pulled in automatically on my previous server using Nginx + Mongrel_Cluster and this seemed to pose no problems.

BUT! when I switched to a new host, I went with an Apache + Passenger (mod_rails) setup and my servers would start but would just offer “Error 500″.

I checked the logs and it seemed that it wasn’t loading RedCloth so I added the following to my environment.rb file and it all worked fine!

1
2
3
# config/environment.rb
require 'rubygems'
require 'redcloth'

photogriffy updated to v0.2

February 10th, 2009

photogriffy.net was upgraged to v0.2, this is a pretty major update. I’ve changed the backend to be based entirely on the Flickr API. I was able to crank it all out with rails and the flickraw gem over the course of a few hours. There are still a lot of features I want to add and a bunch of formatting to do, but the site works as it stands. Rails truly is an amazing prototyping framework.

This is part of a larger update to the way I post my photos to the web. It’s getting a bit scattered with some photos posted to AMDavidson.com, some to AMDavidson.me, some to Flickr, and even a few to Twitpic with very little planning or organization.

So, I’m now working towards putting everything on Flickr and then basing my other websites on that content so the content is unified between the sites and doesn’t require bouncing around the web to places unknown to see it all.

mysql Gem + MacPorts MySQL

January 25th, 2009

I always forget this… so this is as much a note for me as anything else.

Especially because I’m basically just lifting this info from here.

1
2
3
4
sudo gem install mysql -- \
--with-mysql-include=/opt/local/include/mysql5 \
--with-mysql-lib=/opt/local/lib/mysql5 \
--with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config

Despite what the linked website says, it appears that this command works on leopard just fine… no need for any changes.

Installing Nokogiri Gem On Ubuntu

January 19th, 2009

If you cannot install the nokogiri gem on ubuntu (required or recommended) for Mephisto.

You have to install two other libraries first that may or may not already be installed on your computer:

1
sudo apt-get install libxml2-dev libxslt1-dev

Simply installing libxml-ruby or libxml1 won’t satisfy the requirements.

Thanks to hightechsorcery.com for the info.

undefined method `cache_template_loading=’

January 19th, 2009

If you have recently upgraded rails and your site seems to work but your cron jobs for acts_as_xapian no longer work, check out this Rails Commit.

You have a deprecated method and may need to remove the following from your
config/environments/production.rb:

1
config.action_view.cache_template_loading            = true