Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.

uninitialized constant Zermelo::Records #22

@scalp42

Description

@scalp42

Hi @ali-graham,

Running into an issue when trying to include Zermelo:

> bundle exec pry
[1] pry(main)> require 'zermelo'
=> true
[2] pry(main)> require 'redis'
=> true
[3] pry(main)> Zermelo.redis = Redis.new(host: '127.0.0.1', db: 0)
=> #<Redis client v4.0.3 for redis://127.0.0.1:6379/0>
[4] pry(main)> class Test; include Zermelo::Records::Redis; end
NameError: uninitialized constant Zermelo::Records
from (pry):4:in `<class:Test>'
[5] pry(main)> class Test; include ::Zermelo::Records::Redis; end
NameError: uninitialized constant Zermelo::Records
from (pry):5:in `<class:Test>'

Simple Gemfile:

source 'https://rubygems.org'

gem 'redis'
gem 'zermelo', github: 'flapjack/zermelo', branch: 'master'

group :dev do
  gem 'awesome_print'
  gem 'pry'
  gem 'rubocop'
end
Using zermelo 1.4.3 from git://github.com/flapjack/zermelo.git (at master@d7adfdd)

I must be missing something but I also tried to require zermelo/records/redis directly.

Thanks in advance for the help!

UPDATE: it looks like you need to require more than just the gem

=> true
[2] pry(main)> class Post
[2] pry(main)*   include Zermelo::Records::Redis
[2] pry(main)* end
NameError: uninitialized constant Zermelo::Records::Redis
Did you mean?  Zermelo::Records::RedisSet
from (pry):3:in `<class:Post>'
[3] pry(main)>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions