Skip to content

Lit.init returns nil therefore installation process fails #124

@eduarmreyes

Description

@eduarmreyes

I'm not sure if this is regarding the version of my development environment but I can't finish the installation process.

ruby --version
ruby 2.3.6p384 (2017-12-14 revision 61254) [x86_64-linux]

rails --version
Rails 4.2.11

Error is

➜ bundle exec rails g lit:install
What's the authentication function, ie. :authenticate_user! : :authenticate_user!
What's the key value engine? ([hash] OR redis): hash
Skipping config/initializers/lit.rb creation, file already exists!
Running rake db:migrate
~/.rvm/gems/ruby-2.3.6/gems/lit-0.3.3/lib/generators/lit/install_generator.rb:57:in `clear_cache': undefined method `cache' for nil:NilClass (NoMethodError)
	from ~/.rvm/gems/ruby-2.3.6/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	from ~/.rvm/gems/ruby-2.3.6/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	from ~/.rvm/gems/ruby-2.3.6/gems/thor-0.20.3/lib/thor/invocation.rb:133:in `block in invoke_all'
	from ~/.rvm/gems/ruby-2.3.6/gems/thor-0.20.3/lib/thor/invocation.rb:133:in `each'
	from ~/.rvm/gems/ruby-2.3.6/gems/thor-0.20.3/lib/thor/invocation.rb:133:in `map'
	from ~/.rvm/gems/ruby-2.3.6/gems/thor-0.20.3/lib/thor/invocation.rb:133:in `invoke_all'
	from ~/.rvm/gems/ruby-2.3.6/gems/thor-0.20.3/lib/thor/group.rb:232:in `dispatch'
	from ~/.rvm/gems/ruby-2.3.6/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	from ~/.rvm/gems/ruby-2.3.6/gems/railties-4.2.11/lib/rails/generators.rb:157:in `invoke'
	from ~/.rvm/gems/ruby-2.3.6/gems/railties-4.2.11/lib/rails/commands/generate.rb:13:in `<top (required)>'
	from ~/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:274:in `require'
	from ~/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:274:in `block in require'
	from ~/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:240:in `load_dependency'
	from ~/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:274:in `require'
	from ~/.rvm/gems/ruby-2.3.6/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
	from ~/.rvm/gems/ruby-2.3.6/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:130:in `generate_or_destroy'
	from ~/.rvm/gems/ruby-2.3.6/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:50:in `generate'
	from ~/.rvm/gems/ruby-2.3.6/gems/railties-4.2.11/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
	from ~/.rvm/gems/ruby-2.3.6/gems/railties-4.2.11/lib/rails/commands.rb:17:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'

Error is raised in this line of code:

      def clear_cache
        Lit.init.cache.reset
      end

Rails console test

➜ rails c
Loading development environment (Rails 4.2.11)
[1] pry(main)> Lit.init
=> nil

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions