Hey I tried this way:
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'rjb'
=> true
irb(main):003:0> load_path =
File.join('/Library/WebServer/Documents/rubyapps/tproj2/lib/iText.jar')
=> "/Library/WebServer/Documents/rubyapps/tproj2/lib/iText.jar"
irb(main):004:0> options = []
=> []
irb(main):005:0> Rjb::load load_path, options
=> nil
irb(main):006:0> doc = Rjb::import("com.lowagie.text.Document")
NoClassDefFoundError: com/lowagie/text/Document
from (irb):6:in `import'
from (irb):6
from /usr/local/bin/irb:12:in `<main>'
Why am I getting this error?
Craig White wrote:
> On Tue, 2010-03-09 at 16:58 +0100, John Wu wrote:
>> Hi,
>>
>> I have installed both pdf-stamper and rjb on my machine, and when I
>> tired the following code in my controller code
>>
>> pdf = PDF::Stamper.new("YellowReq.pdf")
>>
>> I got an error
>> uninitialized constant HomeController::PDF
> ----
> same error as with other methodology. Did you get the pdf_stamper gem
> installed?
>
> gem list --local # does it show?
> ----
>>
>> I have set up java home
>> export JAVA_HOME = '/Library/Java/Home'
>>
>> How to set up LD_LIBRARY_PATH on my snow leopard?
> ----
> depends upon what/where you've got installed (jre or jdk) but
> generally...
>
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME/jre/lib/i386:
> $JAVA_HOME/jre/lib/i386/client
>
> Craig
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.