Uninitialized constant Teaspoon::Framework

134 Views Asked by At

Upgraded teaspoon 0.9.1 to teaspoon-jasmine 2.3.4. After running rails generate teaspoon:install getting "Error: uninitialized constant Teaspoon::Framework." error

[WARNING] Could not load generator "generators/teaspoon/install/install_generator". Error: uninitialized constant Teaspoon::Framework.

I am using jasmine framework. Any idea why is it throwing Framework error?

1

There are 1 best solutions below

0
arrbee On

I found that this happened when my Gemfile only loaded teaspoon for the :test environment, but I ran rails generate implicitly in the :development environment.

You can either make sure the gem 'teaspoon' (or gem 'teaspoon-jasmine') line is part of the Rails :development environment, or you can try running:

RAILS_ENV=test rails generate teaspoon:install