Skip to content

Error: Could not prefetch printer provider 'cups': undefined method `include?' for nil:NilClass #44

@kbotnen

Description

@kbotnen

Hei,

I updated code to newest master, and Now I get the following error:

Error: Could not prefetch printer provider 'cups': undefined method `include?' for nil:NilClass

It worked without this in an earlier version.

Working version: https://gist.github.com/kbotnen/8c52f7b99e759da152a8
Errorenous version: https://gist.github.com/kbotnen/2270d4a8857d657145e6

Despite the error the printers show up on lpstat -v.

If I try to remove a printer I get more errors

==> precise-gui: Error: Could not prefetch printer provider 'cups': undefined method `include?' for nil:NilClass
==> precise-gui: Notice: /Stage[main]/App::Print/Printer[IT_Print_Ricoh]/ensure: removed
==> precise-gui: Debug: Executing '/usr/sbin/lpadmin -x IT_Print_Ricoh'
==> precise-gui: Error: /Stage[main]/App::Print/Printer[IT_Print_Ricoh]: Could not evaluate: Execution of '/usr/sbin/lpadmin -x IT_Print_Ricoh' returned 1: lpadmin: The printer or class does not exist.

It looks like it try to remove the printer even if its not there (which it doesnt know since the prefetch step failed?).

All behaviour observed in a vagrant environment, with a Ubuntu 12.04 box.

  • Kristian -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions