Ruby, Sinatra and Passenger config on Apache

This is potentially a simple question but I wanted to ask to avoid running around in circles.

I have installed ruby 1.9.2 on Ubuntu and have set up passenger to run with Apache 2.2 on the machine. I am getting the following error when I view the site:

Permission denied - log/sinatra.log

I have changed the permissions for the log directory, but still no luck. The full trace from passenger can be seen on the site page:

Does anyone know if/what I've done wrong or what's happening?

Many thanks


I have discovered that the site runs well using WEBrick on port 4567 on the production server, but the same code errors using Passenger. I have added to show exceptions for errors, so am now getting the following:

NoMethodError at /
undefined method `include?' for nil:NilClass
file: resource.rb location: block in attributes= line: 332

You can see this here:

Any ideas? Please help :)


The new issue with the nil class was due to not finalizing the classes properly. I needed to add the following after the models were loaded:


Thanks to @Frost for his continued help within the comments.

Need Your Help

Integrate Google Analytics API Charts

python pdf-generation google-analytics-api

I'm writing a program to make automatic reports via Google Analytics and everything was going fine until i saw that there should be graphical images, like the Analytics web version. (Most important

Matlab reading serial without pausing

matlab serialization

I'm using fscanf to read data from a constant stream of information, coming from a sensor connected to an arduino, and to plot it in a real time graph.