Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails gem的未初始化常数_Ruby On Rails_Ruby_Ruby On Rails 3.2 - Fatal编程技术网

Ruby on rails gem的未初始化常数

Ruby on rails gem的未初始化常数,ruby-on-rails,ruby,ruby-on-rails-3.2,Ruby On Rails,Ruby,Ruby On Rails 3.2,我已经安装了JWT gem- 当然,在Gemfile中有gem'jwt'。尽管如此,我还是有一个错误 uninitialized constant HomeController::JWT 在HomeController中 class HomeController < ApplicationController def method1 @jwt_token = JWT.encode({.... }) end end class HomeController

我已经安装了JWT gem- 当然,在
Gemfile
中有
gem'jwt'
。尽管如此,我还是有一个错误

uninitialized constant HomeController::JWT
HomeController中

class HomeController < ApplicationController

 def method1
   @jwt_token = JWT.encode({.... })
 end

end
class HomeController
我认为您需要一个
要求“jwt”


HTH

我怎么知道将来我是否需要做什么?对不起,我不确定我是否能公正地回答这个问题。如果你浏览一下你的配置目录,你可能会感觉到为什么不需要其他文件。希望有帮助。