简体   繁体   English

未初始化的恒定Teaspoon :: Framework

[英]Uninitialized constant Teaspoon::Framework

Upgraded teaspoon 0.9.1 to teaspoon-jasmine 2.3.4. 将茶匙0.9.1升级到茶匙茉莉2.3.4。 After running rails generate teaspoon:install getting "Error: uninitialized constant Teaspoon::Framework." 在运行rails后,生成teaspoon:install会出现“错误:未初始化的常量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? 知道为什么会引发框架错误吗?

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. 我发现这是在我的Gemfile仅为:test环境加载teaspoon时发生的,但是我在:development环境中隐式运行了rails generate

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: 您可以确保gem 'teaspoon' (或gem 'teaspoon-jasmine' )行是Rails :development环境的一部分,或者可以尝试运行:

RAILS_ENV=test rails generate teaspoon:install 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM