FPDF installation
- Arlen
- Posts: 13
- Starts: 7
- Wiki Edits: 0
I've installed the plugin for FPDF, and have added the line 'require fpdf' to my 'environments.rb' file. This works fine in my local development app, but it's caused my Rails app to fail to start entirely. I used the command 'killall -usr1 dispatch.fcgi' after making the adjustments.
- Arlen
- Posts: 13
- Starts: 7
- Wiki Edits: 0
I've managed to eliminate the main error, and have confirmed that FPDF is properly installed; however, I still get an error when I actually try to create a PDF file using the library. The application works fine on my local machine.
2007-11-05 12:57 PM
- Arlen
- Posts: 13
- Starts: 7
- Wiki Edits: 0
After checking the production log, I was able to determine that the problem was an image reference in an FPDF method call.
In the development code, this reference was to a web URL, and it works fine. To get it working on the production server, I had to upload the image to a local directory, and use a fully-qualified local path to reference the file.
Why would the FPDF library be able to find an image via HTTP when run locally, and require a local file with an absolute URL when run on then HR server?
In the development code, this reference was to a web URL, and it works fine. To get it working on the production server, I had to upload the image to a local directory, and use a fully-qualified local path to reference the file.
Why would the FPDF library be able to find an image via HTTP when run locally, and require a local file with an absolute URL when run on then HR server?
2007-11-05 01:11 PM
- William
- Posts: 1063
- Starts: 32
- Wiki Edits: 56
It could be the way in which the application servers vary depending on the environment. For example, did you develop on windows/mongrel and deploy to linux/apache/fastcgi ? Any such variances can sometimes cause these kind of problems.