Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

NameError: uninitialized constant Dropcam::Base::OpenSSL #1

Open
queuebit opened this issue Apr 22, 2013 · 7 comments
Open

NameError: uninitialized constant Dropcam::Base::OpenSSL #1

queuebit opened this issue Apr 22, 2013 · 7 comments
Assignees

Comments

@queuebit
Copy link

Wanted to get started using this to be able to turn my dropcam ON / OFF at certain times of the day.

When I go through the settings example in irb I get the following error after I run

Dropcam::Dropcam.new("USERNAME","PASSWORD")
NameError: uninitialized constant Dropcam::Base::OpenSSL

Is there another required gem that I am missing?

@nolanbrown
Copy link
Owner

The openssl gem is required and it appears it isn't installed on your machine. Try installing openssl and compile ruby with openssl support, which is pretty easy using RVM.

@ghost ghost assigned nolanbrown Apr 23, 2013
@queuebit
Copy link
Author

I was able to get it working using https://rvm.io/packages/openssl/.

Thanks.

Now to setup a cron job to turn ON and OFF the dropcam to save from uploading video of an empty room.

@stevenhaddox
Copy link

Since this topic is still open I'll post here as I'm getting the same error with Ruby 2.0.0-p247:

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.5.0]
$ ./dropcam.rb
/Users/steven/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dropcam-0.0.4/lib/dropcam/base.rb:138:in `_dropcam_http': uninitialized constant Dropcam::Base::OpenSSL (NameError)
    from /Users/steven/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dropcam-0.0.4/lib/dropcam/base.rb:69:in `post'
    from /Users/steven/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dropcam-0.0.4/lib/dropcam/session.rb:14:in `authenticate'
    from /Users/steven/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/dropcam-0.0.4/lib/dropcam.rb:11:in `initialize'
    from ./dropcam.rb:6:in `new'
    from ./dropcam.rb:6:in `<main>'

However, OpenSSL itself seems to be working with Ruby just fine:

$ irb
> require 'openssl'
=> true
> key = OpenSSL::PKey::RSA.new 2048
=> #<OpenSSL::PKey::RSA:0x007fd0b137ae68>

Any other ideas what could be triggering this error?

@stevenhaddox
Copy link

By the way, this seems to be working fine with Ruby 1.9.3-p448. It's only 2.x that seems to be having issues.

@nolanbrown
Copy link
Owner

I'll take a look and see. The library was only tested with 1.9.3 and there may be some landmines with adding support for 2.x.

@stevenhaddox
Copy link

@nolanbrown understandable, I wouldn't sweat it too much. It's easy to set RBENV_VERSION as an ENV variable before running the script ;)

@radekw
Copy link
Contributor

radekw commented Feb 26, 2015

This fixed it for me:
#8

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

No branches or pull requests

4 participants