require 'dalli' returns false in the console, although it is in the gemfile

470 views Asked by At

Following https://devcenter.heroku.com/articles/memcachier#ruby

I added memcachier and dalli gems, and did a bundle install

then I ran the console

and I typed

require 'dalli'

and it returns false

and I can't tell why, it also does this in a staging and production environment

1

There are 1 answers

3
alexsmn On BEST ANSWER

If you want to test those in irb

Try:

gem install dalli
gem install memcachier

And after that require them:

require 'dalli'
require 'memcachier'

If you want to test in your app console, you don't need to require them just do that:

cache = Dalli::Client.new
cache.set("foo", "bar")