Forgive me if this is a known issue, but I''m new here.... I just started using Vpim, and I''m getting this error when trying to access the url method of a vcard:> /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/vcard.rb: > 505:in `decode_uri'': uninitialized constant Vpim::Vcard::Uri > (NameError) > from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ > vcard.rb:581:in `decode'' > from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ > vcard.rb:772:in `value'' > from ./mf-parser.rb:262:in `compare'' > from ./mf-parser.rb:189:in `test'' > from ./mf-parser.rb:188:in `test'' > from ./mf-parser.rb:270Am I doing something wrong? I''m using ruby 1.8.4 on Mac OSX. thanks, ryan
Quoting ryan at theryanking.com, on Wed, Jun 14, 2006 at 03:51:47PM -0700:> I just started using Vpim, and I''m getting this error when trying to > access the url method of a vcard:> > /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/vcard.rb: > > 505:in `decode_uri'': uninitialized constant Vpim::Vcard::UriThats a bug. As a workaround until a new release, I suggest the following: require ''vpim/vcard'' module Vpim class Vcard Uri = Vpim::Attachment::Uri end end Thanks, Sam
On Jun 14, 2006, at 8:05 PM, Sam Roberts wrote:> Quoting ryan at theryanking.com, on Wed, Jun 14, 2006 at 03:51:47PM > -0700: >> I just started using Vpim, and I''m getting this error when trying to >> access the url method of a vcard: > >>> /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/vcard.rb: >>> 505:in `decode_uri'': uninitialized constant Vpim::Vcard::Uri > > Thats a bug. As a workaround until a new release, I suggest the > following: > > require ''vpim/vcard'' > > module Vpim > class Vcard > Uri = Vpim::Attachment::Uri > end > endHmm, not quite: /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/vcard.rb:505:in `initialize'': wrong number of arguments (1 for 2) (ArgumentError) from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ vcard.rb:505:in `decode_uri'' from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ vcard.rb:581:in `decode'' from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ vcard.rb:772:in `value'' from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ vcard.rb:960:in `url'' Looks like you''re dealing with two different Uri classes in there. -ryan
On Thu, Jun 15, 2006 at 10:52:44AM -0700, Ryan King wrote:> Hmm, not quite: > > /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/vcard.rb:505:in > `initialize'': wrong number of arguments (1 for 2) (ArgumentError) > from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ > vcard.rb:505:in `decode_uri'' > from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ > vcard.rb:581:in `decode'' > from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ > vcard.rb:772:in `value'' > from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ > vcard.rb:960:in `url'' > > Looks like you''re dealing with two different Uri classes in there.I unified attachment handling for Icalendar and Vcard, looks like I didn''t finish though. If you can get it working, I''ll integrate a patch. It should be using Vpim::Attachment::Uri. Sam
Attached is the simplest patched for making this work, at least for my use case. -ryan -------------- next part -------------- A non-text attachment was scrubbed... Name: vcard-uri.diff Type: application/octet-stream Size: 161 bytes Desc: not available Url : http://rubyforge.org/pipermail/vpim-talk/attachments/20060616/f83a36f4/attachment-0001.obj -------------- next part -------------- On Jun 15, 2006, at 11:39 AM, Sam Roberts wrote:> On Thu, Jun 15, 2006 at 10:52:44AM -0700, Ryan King wrote: >> Hmm, not quite: >> >> /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/vcard.rb:505:in >> `initialize'': wrong number of arguments (1 for 2) (ArgumentError) >> from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ >> vcard.rb:505:in `decode_uri'' >> from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ >> vcard.rb:581:in `decode'' >> from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ >> vcard.rb:772:in `value'' >> from /usr/local/lib/ruby/gems/1.8/gems/vpim-0.360/lib/vpim/ >> vcard.rb:960:in `url'' >> >> Looks like you''re dealing with two different Uri classes in there. > > I unified attachment handling for Icalendar and Vcard, looks like I > didn''t finish though. > > If you can get it working, I''ll integrate a patch. It should be using > Vpim::Attachment::Uri. > > Sam > > _______________________________________________ > Vpim-talk mailing list > Vpim-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/vpim-talk