PDFs prawn gem freeze into the app

I was having great success with creating PDFs with prawn, I followed
Ryan B. 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 23 Mar., 10:01, bingo bob [email protected] wrote:

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.


Best regards,
David K.
http://twitter.com/rubyguy

ok, thanks, I’ll try that a bit later and report back.

bb

bingo bob wrote:

ok, thanks, I’ll try that a bit later and report back.

bb

OK I did that command but no luck…Command completed find but nothing
changed (git status showed me nothing to commit after the command)…

Here’s the ls from the root of the app

README app db lib prawn-0.4.1 script tmp
Rakefile config doc log public test vendor

as you can see prawn is there.

Do I need something else, as I say this works fine on my Mac but not on
the deplyed app on my webhost…

Errors in mongrel.log in production when trying to start the app are as
follows…

** Starting Rails with production environment…
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require’: no such file to load – prawn
(MissingSourceFile)

bla bla

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

On Mar 23, 5:01 am, bingo bob [email protected]
wrote:

I was having great success with creating PDFs with prawn, I followed
Ryan B. 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.

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 J.

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 J. wrote:

trouble.
machine (where Prawn is installed). If that still give you the warning
about ‘no specification file’, let me know.

–Matt J.


View this message in context:
http://www.nabble.com/PDFs-prawn-gem-freeze-into-the-app…-tp22656370p23420025.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.