PDFs prawn gem freeze into the app...

I was having great success with creating PDFs with prawn, I followed Ryan Bates latest screencast. All good.

Trouble is when i come to deploy the app on my webhost I ran into trouble.

Rails 2.3 app. I did, "sudo rake gem unpack prawn" to freeze it in.

I put the app on my webhost but it won't start, some error saying it can't find prawn.

Any ideas? (summary: works locally not on my webhost)

On your local machine:

┬┤rake gems:unpack GEM=prawn┬┤

Then deploy afterwards.

Thanks, rubyguy helped me out with this..

Turns out that I needed to have prawn-0.4.1 in the vendor/gem directory.

For some reason the rake command I ran dropped it in root. vendor/gem/prawn-0.4.1 was not created.

I've fixed by making.. vendor/gem/ and git mv'ing the directory prawn-0.4.1 to it.

Works now (although I do get a strange error about the gem config file for prawn being out of date - it offers a solution which doesn't work either)...

Need to get the hang of these commands, thanks rubyguy!

bb

That shouldn't have worked - the task to unpack gems is rake gems:unpack. The command you typed just errors out; omitting the 'rake' part would get the results you describe.

To get rid of the warning, run 'rake gems:refresh_specs' on your local machine (where Prawn is installed). If that still give you the warning about 'no specification file', let me know.

--Matt Jones

I am seeing this exact issue.

config.gem: Unpacked gem prawn-0.4.1 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.

rails 2.3.2 ruby 1.8.6 (2008-03-03 patchlevel 114) there appears to be no .specification file in vendor/gems/prawn-0.4.1 nor in its system gem directory

rake gems:refresh_specs has no effect

Matt Jones wrote: