views:

153

answers:

2

I have a app that uses Prawn to do some PDF generating, it works fine and I've had no problems with it. It's now come to the point where I want to test it through Apache using Passenger. This is where the problem appears. I get the passenger error page with this error:

no such file to load -- prawn (MissingSourceFile)

I restarted script/server and it didn't error at all so I'm at a loss as to why this isn't working.

A: 

It sounds like you didn't install the Prawn gem on the production server. Try sudo gem install prawn.

John Topley
Production Server and Development server are the same server
Arcath
A: 

The problem is that although the prawnto plugin loads up the prawn gem no problem it can't when running through passenger. So you have to add the config.gem line to environment.rb

config.gem "prawn"
Arcath
I strongly recommend adding a version to that line. Prawn isn't guaranteeing API stability until 1.0, so you don't want innocent gem upgrades to break your app. config.gem "prawn", :version => "0.7.1"
James Healy