PDF::Writer Boggles

B

Brian McCallister

Neither Austin nor myself has been able to diagnose this one.
PDF::Writer is bombing on me in a new and confusing way. Austin
suggested I post here...

When I try to generate the manual:


brianm@kite:~$ techbook
Using default document '/usr/local/lib/ruby/gems/1.8/gems/pdf-
writer-1.0.1/lib/pdf/../../manual.pwd'.
Exception undefined method `_dump' for 672.0:Float around line 0.:
00:01:30
/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.3.0/lib/
transaction/simple.rb:370:in `dump': undefined method `_dump' for
672.0:Float (NoMethodError)
from /usr/local/lib/ruby/gems/1.8/gems/transaction-
simple-1.3.0/lib/transaction/simple.rb:370:in `start_transaction'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:468:in `techbook_heading'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:565:in `techbook_parse'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:536:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:536:in `techbook_parse'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:874:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/bin/
techbook:24
from /usr/local/bin/techbook:18:in `load'
from /usr/local/bin/techbook:18
brianm@kite:~$

The system is OS X 10.4.1 with ruby 1.8.2 from the source tarball
(not using the built-in (broken) ruby). I'm using the gem install

brianm@kite:~$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0.0]
brianm@kite:~$ uname -a
Darwin kite.local 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10
18:16:08 PDT 2005; root:xnu-792.1.5.obj~4/RELEASE_PPC Power Macintosh
powerpc
brianm@kite:~$ gem list

*** LOCAL GEMS ***

actionmailer (0.9.1)
Service layer for easy email delivery and testing.

actionpack (1.8.1)
Web-flow and rendering framework putting the VC in MVC.

actionwebservice (0.7.1)
Web service support for Action Pack.

activerecord (1.10.1)
Implements the ActiveRecord pattern for ORM.

activesupport (1.0.4)
Support and utility classes used by the Rails framework.

color-tools (1.1.0)
color-tools provides RGB and CMYK colour definitions and
manpiulations.

mysql (2.5.1)
MySQL/Ruby provides the same functions for Ruby programs that the
MySQL C API provides for C programs.

pdf-writer (1.0.1)
A pure Ruby PDF document creation library.

postgres (0.7.1)
The extension library to access a PostgreSQL database from Ruby.

progressbar (0.0.3)
Ruby/ProgressBar is a text progress bar library for Ruby. It can
indicate progress with percentage, a progress bar, and estimated
remaining time.

rails (0.12.1)
Web-application framework with template engine, control-flow layer,
and ORM.

rake (0.5.4)
Ruby based make-like utility.

sources (0.0.1)
This package provides download sources for remote gem installation

transaction-simple (1.3.0)
Simple object transaction support for Ruby.

wee (0.8.0)
Wee is a framework for building highly dynamic web applications.
brianm@kite:~$


Howeverm it gets even better -- that stack trace is from yesterday
when I originally posted the problem to Austin. Attempting again
today I get a different stack trace!

brianm@kite:~$ techbook
Using default document '/usr/local/lib/ruby/gems/1.8/gems/pdf-
writer-1.0.1/lib/pdf/../../manual.pwd'.
Exception undefined method `marshal_dump' for "N":String around line
0.01:38
/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.3.0/lib/
transaction/simple.rb:370:in `dump': undefined method `marshal_dump'
for "N":String (NoMethodError)
from /usr/local/lib/ruby/gems/1.8/gems/transaction-
simple-1.3.0/lib/transaction/simple.rb:370:in `start_transaction'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:468:in `techbook_heading'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:565:in `techbook_parse'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:536:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:536:in `techbook_parse'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/lib/
pdf/techbook.rb:874:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/pdf-writer-1.0.1/bin/
techbook:24
from /usr/local/bin/techbook:18:in `load'
from /usr/local/bin/techbook:18
brianm@kite:~$

No clue what is going on!

Help?

Thanks!

-Brian
 
J

Jason Foreman

Neither Austin nor myself has been able to diagnose this one.
PDF::Writer is bombing on me in a new and confusing way. Austin
suggested I post here...
=20
When I try to generate the manual:
=20
[... snip ...]
=20
The system is OS X 10.4.1 with ruby 1.8.2 from the source tarball
(not using the built-in (broken) ruby). I'm using the gem install
=20
brianm@kite:~$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0.0]
brianm@kite:~$ uname -a
Darwin kite.local 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10
18:16:08 PDT 2005; root:xnu-792.1.5.obj~4/RELEASE_PPC Power Macintosh
powerpc

[... snip ...]
=20
No clue what is going on!
=20
Help?
=20
Thanks!
=20
-Brian
=20
=20

Your ruby is hosed, or you aren't actually running under the version
you compiled. I had a problem before where even though 'which ruby'
showed /usr/local/bin/ruby, when I executed ruby it was still using
the version in /usr/bin.

What options did you give ./configure when you built ruby? Did you
build readline first?

Here is the output from my machine:

legolas:~/Download/src/jruby jason$ uname -mpsrv
Darwin 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10 18:16:08 PDT 2005; roo=
t:xnu
-792.1.5.obj~4/RELEASE_PPC Power Macintosh powerpc

legolas:~/Download/src/jruby jason$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.1.0]

legolas:~/Download/src/jruby jason$ which ruby
/usr/local/bin/ruby

legolas:~/Download/src/jruby jason$ /usr/bin/ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]


Notice my 'ruby -v' shows [powerpc-darwin8.1.0] whereas on your
machine shows [powerpc-darwin8.0.0].

Better try building ruby again. Also make sure after you build ruby
that you rebuild rubygems. I first had to close the active terminal
window and open a new one for this to build correctly.


Hope that helps,

Jason
 
B

Brian McCallister

Rebuilt, letting darwinports handle the readline nastiness this time,
and its working fine.

Good catch, thanks!

-Brian

Neither Austin nor myself has been able to diagnose this one.
PDF::Writer is bombing on me in a new and confusing way. Austin
suggested I post here...

When I try to generate the manual:

[... snip ...]

The system is OS X 10.4.1 with ruby 1.8.2 from the source tarball
(not using the built-in (broken) ruby). I'm using the gem install

brianm@kite:~$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0.0]
brianm@kite:~$ uname -a
Darwin kite.local 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10
18:16:08 PDT 2005; root:xnu-792.1.5.obj~4/RELEASE_PPC Power Macintosh
powerpc

[... snip ...]

No clue what is going on!

Help?

Thanks!

-Brian

Your ruby is hosed, or you aren't actually running under the version
you compiled. I had a problem before where even though 'which ruby'
showed /usr/local/bin/ruby, when I executed ruby it was still using
the version in /usr/bin.

What options did you give ./configure when you built ruby? Did you
build readline first?

Here is the output from my machine:

legolas:~/Download/src/jruby jason$ uname -mpsrv
Darwin 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10 18:16:08 PDT
2005; root:xnu
-792.1.5.obj~4/RELEASE_PPC Power Macintosh powerpc

legolas:~/Download/src/jruby jason$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.1.0]

legolas:~/Download/src/jruby jason$ which ruby
/usr/local/bin/ruby

legolas:~/Download/src/jruby jason$ /usr/bin/ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]


Notice my 'ruby -v' shows [powerpc-darwin8.1.0] whereas on your
machine shows [powerpc-darwin8.0.0].

Better try building ruby again. Also make sure after you build ruby
that you rebuild rubygems. I first had to close the active terminal
window and open a new one for this to build correctly.


Hope that helps,

Jason
 
A

Austin Ziegler

Good catch, thanks!

Yes. Thanks! I had a feeling it was a build issue, but it didn't make
sense to me to be able to call it one way or another.

-austin
--=20
Austin Ziegler * (e-mail address removed)
* Alternate: (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top