- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的应用程序在部署后今天下午开始崩溃。
这是堆栈:
2013-07-26T17:56:41.137752+00:00 app[web.1]: ** [NewRelic][07/26/13 17:56:41 +0000 b35a7e48-4d93-4e0d-af43-376dec33f34b (2)] INFO : Starting Agent shutdown
2013-07-26T17:56:41.467644+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- JSON (LoadError)
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/lib/wwtk/device_api.rb:1:in `<top (required)>'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /
app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:230:in `block in constantize'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `each'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
2013-07-26T17:56:41.467644+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:502:in `load_missing_constant'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:192:in `block in const_missing'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `each'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:229:in `constantize'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:190:in `const_missing'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:554:in `get'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:24:in `klass'
2013-07-26T17:56:41.467829+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:43:in `build'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `block in build'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `each'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `inject'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:140:in `start'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from config.ru:1:in `new'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/stack.rb:113:in `build'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:470:in `app'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from config.ru:4:in `block in <main>'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-07-26T17:56:41.467981+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn.rb:44:in `block in builder'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:722:in `call'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn/http_server.rb:722:in `build_app!'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/bin/unicorn:126:in `<top (required)>'
2013-07-26T17:56:41.468517+00:00 app[web.1]: from config.ru:4:in `require'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/unicorn-4.6.2/lib/unicorn.rb:44:in `eval'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `<main>'
2013-07-26T17:56:41.468682+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/unicorn:23:in `load'
2013-07-26T17:56:43.135205+00:00 heroku[web.1]: State changed from starting to crashed
我们并没有真正改变我们的 Gemfile。
Gemfile.lock 已包含 json:
> grep json Gemfile.lock
multi_json (~> 1.0)
multi_json (~> 1.0)
json
json (1.8.0)
multi_json (>= 1.5)
multi_json (1.7.6)
multi_json (~> 1.0)
multi_json (~> 1.3)
json (~> 1.4)
multi_json (~> 1.0)
multi_json (~> 1.0)
multi_json (~> 1.0, >= 1.0.2)
我尝试重新启动应用程序或使用heroku repo:purge_cache。没有任何帮助。
最佳答案
参数。这是我们的一项需求中区分大小写的问题
-require 'JSON'
+require 'json'
已修复。开发环境对此并不敏感。
关于heroku - 应用程序崩溃 : active_support/dependencies. rb:251:in `require':无法加载此类文件 - JSON(LoadError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17889366/
在非 Rails 项目中,我可以单独安装 activesupport。当我需要它很酷的 monkeypatch 功能时: require 'active_support/core_ext' 但是它是如
在我在 Windows 7 中运行的 rails 2.3.8 应用程序中,尝试启动服务器时出现以下错误: D:\app1>ruby script/server C:/Ruby/lib/ruby/sit
我使用 Capistrano 来部署我的应用程序。 Ruby 由 RVM 安装在我的 Mac 上,服务器上的 Ruby 版本 (2.2.5) 由 rbenv 安装。 我想cap production
我有一个 ruby gem,我想在包含在 rails active_support 模块中的 gem 中使用 Hash.from_xml 方法。我的 gemspec 中有以下代码: gem.add
我试图运行 brew doctor 但系统弹出错误 /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/
如何使用 ActiveSupport 模块中定义的方法? 例如我想使用camelize 方法。 我试过这段代码,但它没有用 undefined method 错误。 require 'active_s
我正在查看 active_support.rb 以尝试了解它使用的加载过程。它使用三种加载方法:load_all!、autoload 和require。为什么在同一个文件中使用三种不同的加载方式? m
我在使用 Ruby 2.2.1 并安装了 active_support 4.2,所以我想使用 Time.zone.parse('2007-02-10 15:30:45') 如此处所述:http://a
当我需要 'active_support/core_ext' 时,出现错误: NameError: uninitialized constant ActiveSupport::Autoload fro
我做了sudo apt-get install rails,一切看起来都很好。 Reading package lists... Done Building dependency tree
我的应用程序在部署后今天下午开始崩溃。 这是堆栈: 2013-07-26T17:56:41.137752+00:00 app[web.1]: ** [NewRelic][07/26/13 17:56:
我不熟悉 active_support,所以请多多包涵! Fox's library允许通过谷歌的 API 进行搜索,但它需要积极的支持。我似乎无法让它工作!有什么想法吗? require 'ruby
我安装了新的 Ruby (2.0) 和 Rails 4.0,当我执行“Rails new test_app”时,我得到以下信息。有人遇到过这个吗? [devuser@devbox ~]$ rails
我今天要更新到 Rails 4.1。我运行了 bundle update rails,一切似乎都更新得很好。但是,当我现在尝试运行任何 rake 任务时,我收到以下错误: $ rake --trace
我在 Windows 机器上使用 Ruby 2.1.5、Rails 4.1.6 和 PostgreSQL 9.3.5。 当我尝试bundle exec rails server 时,我遇到了以下错误:
我是一名优秀的程序员,十分优秀!