Mikey Hogarth

Digital Media Development, Code and Opinions

PDF generation in rails 3 with prawn

Firstly, as always, there is a fantastic Railscast by Ryan Bates which explains Prawn perfectly. Having said that, there are a few things that it doesn’t mention that you need to do in order to use prawn in Rails 3. The path to getting this working is as follows;

#First install prawn on your system (lose the sudo if you're running under RVM)
sudo gem install prawn

#install the prawnto plugin
rails plugin install https://github.com/prior/prawnto.git

#add prawn to your Gemfile
gem "prawn"

After this, you should be able to do everything Ryan does in his railscast :)

About these ads

One Response to PDF generation in rails 3 with prawn

  1. Ping June 4, 2012 at 6:47 am

    I tried but still got error “Completed 406 Not Acceptable in 2ms”.

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 445 other followers

%d bloggers like this: