gpt4 book ai didi

ruby-on-rails - 来自应用程序 : cannot load such file -- js_regex (LoadError) with client_side_validations 的消息

转载 作者:太空宇宙 更新时间:2023-11-03 16:45:04 24 4
gpt4 key购买 nike

我尝试部署我的 Rails 应用程序(到 Cloud66 和 DigitalOcean),但是在访问该应用程序时,它只是说:

We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.

根据日志(粘贴在下面),缺少 js_regex gem。但是我无法修复它,因为在本地一切正常。而且,如果我拿走 client_side_navigation gem,一切也都适用于生产。似乎它无法在生产中加载 js_regex,但我不知道为什么。 (client_side_validations 取决于 js_regex)

使用 Rails 4.2.2、ruby 2.2.0 和 client_side-validations 4.2.1,js_regex 是版本 1.0.12。

这里是 nginx 错误日志:

— Message from application: cannot load such file --     js_regex (LoadError)
— /var/deploy/flokky/web_head/shared/bundle/ruby/2.3.0/bundler/gems/client_side_validations- 4f000000a858/lib/client_side_validations/core_ext/regexp.rb:1:in `require'
— /var/deploy/flokky/web_head/shared/bundle/ruby/2.3.0/bundler/gems/client_side_validations-4f000000a858/lib/client_side_validations/core_ext/regexp.rb:1:in `<top (required)>'
— /var/deploy/flokky/web_head/shared/bundle/ruby/2.3.0/bundler/gems/client_side_validations-4f000000a858/lib/client_side_validations/core_ext.rb:3:in `require'
— /var/deploy/flokky/web_head/shared/bundle/ruby/2.3.0/bundler/gems/client_side_validations-4f000000a858/lib/client_side_validations/core_ext.rb:3:in `<top (required)>'
— /var/deploy/flokky/web_head/shared/bundle/ruby/2.3.0/bundler/gems/client_side_validations-4f000000a858/lib/client_side_validations/active_model.rb:1:in `require'
— /var/deploy/flokky/web_head/shared/bundle/ruby/2.3.0/bundler/gems/client_side_validations-4f000000a858/lib/client_side_validations/active_model.rb:1:in `<top (required)>'
— /var/deploy/flokky/web_head/shared/bundle/ruby/2.3.0/bundler/gems/client_side_validations-4f000000a858/lib/client_side_validations.rb:5:in `require'
— /var/deploy/flokky/web_head/shared/bundle/ruby/2.3.0/bundler/gems/client_side_validations-4f000000a858/lib/client_side_validations.rb:5:in `<top (required)>'
— /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
— /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
— /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
— /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
— /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
— /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
— /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
— /var/deploy/flokky/web_head/releases/20160127023519/config/application.rb:7:in `<top (required)>'
— /var/deploy/flokky/web_head/releases/20160127023519/config/environment.rb:2:in `require'
— /var/deploy/flokky/web_head/releases/20160127023519/config/environment.rb:2:in `<top (required)>'

谢谢!

最佳答案

我刚刚用过:

gem 安装 js_regex

关于ruby-on-rails - 来自应用程序 : cannot load such file -- js_regex (LoadError) with client_side_validations 的消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35028063/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com