Errors

72 views
Skip to first unread message

jena peoples

unread,
May 2, 2012, 5:49:29 PM5/2/12
to origa...@googlegroups.com
Did anyone notice that the URL/URI class definitions in /Library/Ruby/Gems/1.8/gems/origami-1.2.3/lib/origami

are just that? What is this URI deal? 

When I use URL in the command I get an error:

>>> Action::URL(www.google.com)
NameError: undefined local variable or method `www' for main:Object
from (irb):2
>>> 


Also, I looked at the class definition so I tried to use URI:

>>> Action::URI(www.google.com)
NameError: undefined local variable or method `www' for main:Object
from (irb):2
>>> 

However, ONE TIME while in the environment something flickered and I got this prompt (see the inline text and notice):

>>> >>> 

Where I entered the URI command string and didn't get any errors. But I also couldn't accomplish anything. Check out the inline text below. It didn't save when I entered the pdf.saveas, nor do I know how to exit the environment to check and see if exiting would solidify the commands. 

Sorry if I'm not using proper verbiage.. I'm a noob.

Thanks for any input guys!

~jena
@jenapeoples


>>> pdf=PDF.read("~/Desktop/JPResume.pdf")
[info ] ...Reading header...
[info ] ...Parsing revision 1...
[info ] ...Parsing xref table...
[info ] ...Parsing trailer...

---------- Header ----------
  [+] Major version: 1
  [+] Minor version: 3
----------  Body  ----------
  44 0 R  Array
  33 0 R  FontDescriptor
  26 0 R  Integer
  15 0 R  Stream
  36 0 R  Stream
  25 0 R  Stream
  18 0 R  FontDescriptor
   7 0 R  Array
  43 0 R  ByteString
  28 0 R  Stream
  17 0 R  Catalog
  35 0 R  Integer
   9 0 R  Font
  20 0 R  Integer
   2 0 R  Page
   1 0 R  Dictionary
  38 0 R  ByteString
  27 0 R  FontDescriptor
  12 0 R  Font
  37 0 R  Integer
  30 0 R  FontDescriptor
  19 0 R  Stream
   4 0 R  Stream
  40 0 R  ByteString
  11 0 R  Font
  29 0 R  Integer
  22 0 R  Stream
  32 0 R  Integer
  21 0 R  FontDescriptor
  14 0 R  Font
   3 0 R  PageTreeNode
  39 0 R  ByteString
  24 0 R  FontDescriptor
  13 0 R  Font
   6 0 R  Dictionary
  42 0 R  ByteString
  31 0 R  Stream
  16 0 R  Integer
   5 0 R  Integer
  41 0 R  ByteString
  34 0 R  Stream
   8 0 R  Font
  23 0 R  Integer
---------- Trailer ---------
  [*] /Root: 17 0 R
  [*] /Size: 45
  [*] /ID: [ <8BC7F39CD6F92A13319136EB60BFD366> <8BC7F39CD6F92A13319136EB60BFD366> ]
  [*] /Info: 1 0 R
  [+] startxref: 88363


>>> >>> Action::URI("www.google.com")
>>> pdf.onDocumentOpen Action::URI("www.google.com")
>>> pdf.saveas("~/Desktop/NewResume.pdf")
>>> 
[2]+  Stopped                 pdfsh
USER:origami star$ pwd
/Library/Ruby/Gems/1.8/gems/origami-1.2.3/lib/origami

Martin F. Schumann

unread,
May 3, 2012, 12:25:14 AM5/3/12
to origa...@googlegroups.com


Am 03.05.2012 05:42 schrieb "jena peoples" <jena.p...@gmail.com>:
>
> Did anyone notice that the URL/URI class definitions in /Library/Ruby/Gems/1.8/gems/origami-1.2.3/lib/origami
>
> are just that? What is this URI deal? 
>
> When I use URL in the command I get an error:
>
> >>> Action::URL(www.google.com)
> NameError: undefined local variable or method `www' for main:Object
> from (irb):2
> >>> 
>

You forgot the quotation marks around the string 'www.Google.com'

>
> Also, I looked at the class definition so I tried to use URI:
>
> >>> Action::URI(www.google.com)
> NameError: undefined local variable or method `www' for main:Object
> from (irb):2
> >>> 
>

Ditto

jena peoples

unread,
May 3, 2012, 1:51:11 PM5/3/12
to origa...@googlegroups.com
Not sure why I didn't put them in here when I wrote the email but I have tried both with quotations and get the same error. 




>>> Action::URI("www.google.com")
NoMethodError: undefined method `URI' for Origami::Action:Class
from (irb):2

>>> Action::URL.new("www.google.com")
<<
>>
>>> pdf.onDocumentOpen Action::URL("www.google.com")
NoMethodError: undefined method `URL' for Origami::Action:Class
from (irb):3
>>> pdf.onDocumentOpen Action::URI("www.google.com")
NoMethodError: undefined method `URI' for Origami::Action:Class
from (irb):4
>>> 

Martin F. Schumann

unread,
May 3, 2012, 3:15:49 PM5/3/12
to origa...@googlegroups.com


Am 03.05.2012 19:51 schrieb "jena peoples" <jena.p...@gmail.com>:
>
> Not sure why I didn't put them in here when I wrote the email but I have tried both with quotations and get the same error. 

It's a completely different error now, if you look at it a bit closer. ;-)

>
>
>
>
> >>> Action::URI("www.google.com")
> NoMethodError: undefined method `URI' for Origami::Action:Class
> from (irb):2
>
> >>> Action::URL.new("www.google.com")
> <<
> /F (www.google.com)
> >>
> >>> pdf.onDocumentOpen Action::URL("www.google.com")
> NoMethodError: undefined method `URL' for Origami::Action:Class
> from (irb):3
> >>> pdf.onDocumentOpen Action::URI("www.google.com")
> NoMethodError: undefined method `URI' for Origami::Action:Class
> from (irb):4
> >>> 
>

You need to call the constructor for the action object to be created, so don't forget the ".new" in the end

Action::URI.new("www.Google.com")

Btw here you can find an example for your problem: http://esec-lab.sogeti.com/pages/Origami

jena peoples

unread,
May 3, 2012, 5:02:53 PM5/3/12
to origa...@googlegroups.com
:D Thanks for your insight and patients :D
Reply all
Reply to author
Forward
0 new messages