Closed JamesPlayer closed 6 years ago
I believe this is the core of your problem.
/Users/james/.rbenv/versions/2.4.1/lib/ruby/2.4.0/openssl/cipher.rb:64:in `<class:Cipher>': superclass mismatch for class Cipher (TypeError)
Do you have a class or module named Cipher
in your project? If so you have either not followed Ruby or Rails (or both) naming / directory structure conventions, and that is causing the super class mismatch.
@pboling No I don't have any classes or modules named Cipher in my project. Seems to be something related to OpenSSL, like it's getting initialized twice or something. Not sure why.
@JamesPlayer Here's what I have at the top of my clock:
require 'clockwork'
require './config/boot'
require './config/environment'
Docs be damned.
@pboling thanks for taking a look. For some reason those three lines alone is enough to trigger the warnings and error (even if I just run it with ruby ie ruby clock.rb
). It seems to be a combination of require 'clockwork'
and require './config/environment'
that does it.
Found the issue, it was with my personal setup.
Issue was that I had two versions of the openssl
gem trying to be loaded at the same time.
doing a gem list
showed: openssl (2.0.5, default: 2.0.3)
Reverting to the default version fixed the problem:
gem uninstall openssl -v 2.0.5
gem install openssl -v 2.0.3
I'm trying to use the database driven clockwork approach following the example given in the docs. Here is my
clock.rb
file:When I run
clockwork clock.rb
I get the following errors:The issue seems to stem from the
require_relative './config/environment'
line.I'm using rails 5.1 and ruby 2.4.1, and OS is MacOS High Sierra
Here are the gems I'm using in the project:
Any ideas?