Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.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 为什么我的宝石叉在生产中不起作用?_Ruby On Rails_Ruby_Gem_Thin - Fatal编程技术网

Ruby on rails 为什么我的宝石叉在生产中不起作用?

Ruby on rails 为什么我的宝石叉在生产中不起作用?,ruby-on-rails,ruby,gem,thin,Ruby On Rails,Ruby,Gem,Thin,我使用gem否定验证码使其与SimpleForm一起工作。我将我的应用程序更改为在开发模式下使用fork 然后,我部署到了stage(Rails 3.2.16,Ruby 2.1.1;Linux上由Thin提供支持)。当我点击一个使用gem的页面时,我得到一个500错误:未初始化常量NegativeCaptcha。在登台服务器的控制台中,我尝试引用NegativeCaptcha,类就在那里。 我无法理解为什么正在运行的应用程序找不到/没有加载我的fork的NegativeCaptcha类。我无法在

我使用gem
否定验证码
使其与
SimpleForm
一起工作。我将我的应用程序更改为在开发模式下使用fork

然后,我部署到了stage(Rails 3.2.16,Ruby 2.1.1;Linux上由Thin提供支持)。当我点击一个使用gem的页面时,我得到一个500错误:
未初始化常量NegativeCaptcha
。在登台服务器的控制台中,我尝试引用
NegativeCaptcha
,类就在那里。 我无法理解为什么正在运行的应用程序找不到/没有加载我的fork的
NegativeCaptcha
类。我无法在本地重现该问题(如果我在Mac上使用Thin运行我的应用程序,它工作正常)


对于如何调试这个问题,我也没有主意。fork和我的应用程序中的调试语句根本没有帮助。如果您能帮助我解决此问题,我将不胜感激。

请尝试以下gem声明:

gem 'negative_captcha', github: 'cstump/negative-captcha'

并确保它不在开发组中

是否在您的GEM文件中您如何引用它?谢谢@Doon。我的Gemfile有
gem'negative\u captcha','0.3.4',git:'git@github.com:cstump/negative captcha.git'
在其中。检查您的Gemfile.lock我不确定如何读取Gemfile.lock,但是
negative\u captcha(=0.3.4)位于文件的
依赖项
部分下,它位于顶部:
GIT remote:git@github.com:cstump/negative-captcha.git修订版:a616eb0ce7eb471919d200bd0bf99e4590948a24规范:negative_captcha(0.3.4)actionpack activesupport
如果使用此声明,结果相同