Elia Schito

RailsPDF plugin installation

In PDF, Programming, Rails, Rails plugin, RailsPDF, Ruby, Ruby on Rails on February 9, 2007 at 4:20 pm

 After the installation (see more) I found that this plugin is not working very well :(

and now I’m back to my in-controller ugly code.

If you’re using the gems plugin with rails 1.2 and the updated ruby-gems you might experience some problems, here’s the fixed rake task for the gems plugin.

I hoped to have a neat (=lazy) solution with other plugins like RFPDF, but I’ve found no table support there. So I ended up with PDF::Writer, and now my lazyness brings me to use a plugin with view-support instead of hardcoding the PDF output in the controler (pretty ugly).
As I found few docs about RailsPDF plugin, here’s the tip:

to install this plugin by the conventional way type this (Hey! Slashes are in win-style):

ruby script\plugin install svn://rubyforge.org/var/svn/railspdfplugin/railspdf

RailsPDF depends on PDF::Writer (which in turn depends on transaction-simple and color-tools)

so my advice is to use the great gems plugin:

ruby script\plugin install http://svn.techno-weenie.net/projects/plugins/gems/

gem install pdf-writer transaction-simple color-tools --include-dependencies

rake gems:freeze GEM=pdf-writer
rake gems:freeze GEM=transaction-simple
rake gems:freeze GEM=color-tools

Ok folks, that’s all, this way you’re not dependent on gems installed on the deploy server.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: