Introduction

So many of you may be trying to get oniguruma installed on Mac OS X Leopard + MacPorts. You may not know that the gem does not allow for a custom directory for the oniguruma package. This poses to be an issue if installed via MacPorts.

That being said I have research the solution to this annoying problem.

Setup

- sudo port install oniguruma5

- sudo gem install oniguruma

Note: This will fail

- cd /Library/Ruby/Gems/1.8/gems/oniguruma-1.1.0/ext

- vim extconf.rb

Make your extconf.rb file look like this

require 'mkmf'

dir_config("onig")

if have_library("onig")

$CFLAGS='-Wall'

create_makefile( "oregexp" )

else

puts "Cannot find lib-oniguruma. Set location with e.g. --with-onig-dir=/opt/local"

exit 1

end

Save and Quit Vim

- rake gem

-

sudo gem install --local pkg/oniguruma-1.1.0 -- --with-onig-dir=/opt/local

Now you are all set!

— Ron Valente

Just to show what value add really means, we have a company that is dedicated to making good products. They pay attention to detail and it shows by error screens that look like this. Job well done Phusion.

Sexy Errors

Introduction

Here is the, the long awaited second part of my extensive guide on setting up a rails server running on Ubuntu 8.04. Everything should be going smoothly so far and you should be at the point where we need to setup Apache and link everything together. This guide will be quite verbose and much longer than the first one. This is due mostly to all the configuration that will be required. That being said I will contemplate making a third part of this guide that will cover the version control and capistrano recipes. Your thoughts are greatly apreciated, esecially if you want me to cover any other features or topics after you finish reading this guide.

As pointed out by a reader, some people may not have read part 1 yet. Click here to read Part 1 of this guide.

Read the rest of this entry

Introduction

So before my monstrous OpenSolaris 2008.05 post on setting up a Ruby on Rails server I decided to write a guide on setting up a Ubuntu 8.04 server guide for all you Slicehost users! I decided to write this guide because of the new optimized kernel that was added to Ubuntu Server 8.04 for virtualized environments. I also wanted a complete guide that would be a solid reference and now just have bits and pieces for upcoming sysadmins will get lost when reading.

For simplicity I will start with a black machine and build upon that. Use the comments section for specific questions or starting points. I will try to do my best at answering any and all questions.

Requirements

This section will go over the simple requirements of the entire setup.

Hardware

Ubuntu 8.04 Server - This could be anything below:

  • Slicehost
  • VMware
  • Bare Metal Install

Software

  • Apache 2.2.8
  • MySQL/PostgreSQL/SQLite3
  • Git
  • Ruby
  • Rubygems
    • Rails
    • Capistrano
    • RSpec
    • Passenger
Read the rest of this entry

Just a quick note. I have rolled out a version of pictrails at http://benssite.org. I'm posting any of my new pictures there. As well as soon moving some of my old pictures over. In addition, I'm continuing to add features. The next feature on the boards is allowing for a custom specification of the front-page gallery by allowing the user to handpick pictures from other galleries instead of having a special gallery just for the front-page.

-Ben

Hello everyone, so if you haven't noticed I have not been posting much to Sysadmins' Chronicles lately. Well other then school, which has been consuming much of my time, I've been working on Pictrails. Pictrails is a web gallery written in Ruby on Rails. Currently my branch of the project is on Github at http://github.com/unilogic/pictrails. The original project is by a guy named Cyril Mougel and he has the master branch of the project here: http://github.com/shingara/pictrails. Currently my branch has the following features:

  • Photo-blog like front page (pictures for front-page are from selected gallery/album)
  • RSS feed of the front page photos and descriptions
  • Support for both RMagick (ImageMagick) and ImageScience (FreeImage)
  • Ability to create several galleries
  • Ability to create several pictures in a gallery
  • Ability to create a gallery from a defined directory on the same server as Pictrails (Mass Upload)
  • Show EXIF information from the picture
  • Download original photo
  • Aggressive caching of all public pages including RSS feed
  • Admin interface with login to add/edit/delete galleries, pictures, manage settings, and users
  • Settings to control the following
    • Define the thumbnails and pictures dimensions
    • Reset the caching system
    • Define the number of pictures per page shown per page
    • Define the number of galleries shown per page
    • Enable/Disable showing of EXIF info and downloading of original photos
    • Regenerate thumbnails and shown pictures based on new dimensions
    • Limit the number of items in your RSS feed
    • Select Image Processor (Rmagick or ImageScience)
    • Select the gallery the front-page is based on

The catalyst for me working on this project was http://benssite.org, which is my own web gallery based on two web application. SimpleGallery (my own app) runs the front page, and all the albums in the Gallery are hosted on Gallery. Ron and I are slowly trying to migrate away from any PHP based web application which Gallery is written in, and no web gallery written in RoR currently is available that suits my needs. Let alone running two web application for one site is a bit ridiculous.

Feel free to post any comments or suggestions here. The official bug tracking system for the master branch of the project is available at http://dev.shingara.fr/projects/show/3. However, currently I don't pay attention to it as I'm not a member of the development team of the official project. Also feel free to send me any messages on GitHub.

I will post again once I have http://benssite.org converted over to Pictrails, so you can see a full demo. Till then fair well and have a great day!

Ben

What Have We Been Doing?

April 14th, 2008

Introduction

Lately I have been working hard testing many deployment options for rails applications. The results are quite interesting. I will be going into detail analysis of each setup that we testing including hardware I used, how I setup each test, the benchmarks (obviously) and lastly the winners for each category. As we know DHH doesnt recommend Rails apps to be hosted on shared hosting solutions. That being said Slicehost has done wonderfully and we recommend them highly.

Our Situation

We have been looking for a way to optimize our rails app hosting solution. Currently we use Litespeed 3.3.9 and the Ruby LSAPI. This decreases the memory requirements immensely compared to other solutions like thin.

Testing

Ruby Interpreter Tests

  • Ruby18/JRuby - Performance & Memory Requirements

WebServer Tests

  • Nginx with Mongrel
  • Nginx with Thin
  • Litespeed
  • Apache with Passenger
  • Glassfish/JRuby

More on all of this in my upcoming post. Any comments are requests for benchmarks are welcome and encouraged!

Regards, Ron