Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uninitialized constant Enumerable::Enumerator #19

Open
rahulsom opened this issue Mar 12, 2015 · 0 comments
Open

uninitialized constant Enumerable::Enumerator #19

rahulsom opened this issue Mar 12, 2015 · 0 comments

Comments

@rahulsom
Copy link

I'm trying to look at recurrences of a calendar event and running into that error

Here's my code

  calendars = Vpim::Icalendar.decode(ics)
  calendars.each do |calendar|
    cal_data = calendar.
        select  { |event| event.occurs_in?(Time.now, Time.now + 86400 * 10) }.
        collect { |event| event_hash(event) }.
        sort_by { |event| event['end'] }.
        each    { |event| puts event }
  end

The full trace is here

/opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/vpim-13.11.11/lib/vpim/property/recurrence.rb:40:in `occurrences': uninitialized constant Enumerable::Enumerator (NameError)
    from jobs/confluence_calendar.rb:44:in `block (3 levels) in <main>'
    from /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/vpim-13.11.11/lib/vpim/icalendar.rb:347:in `block in components'
    from /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/vpim-13.11.11/lib/vpim/icalendar.rb:345:in `each'
    from /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/vpim-13.11.11/lib/vpim/icalendar.rb:345:in `components'
    from /opt/rubies/2.1.2/lib/ruby/gems/2.1.0/gems/vpim-13.11.11/lib/vpim/icalendar.rb:364:in `each'
    from jobs/confluence_calendar.rb:43:in `select'
    from jobs/confluence_calendar.rb:43:in `block (2 levels) in <main>'
    from jobs/confluence_calendar.rb:40:in `each'
    from jobs/confluence_calendar.rb:40:in `block in <main>'
    from jobs/confluence_calendar.rb:34:in `each'
    from jobs/confluence_calendar.rb:34:in `<main>'

I'm using ruby 2.1.2 and vpim 13.11.11 if that makes a difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant