gpt4 book ai didi

ruby-on-rails - 乘客 Rails 4 应用程序启动 = 未初始化的常量 ActiveModel::Serializer

转载 作者:行者123 更新时间:2023-12-03 15:39:22 26 4
gpt4 key购买 nike

我知道这是一个奇怪的请求,但我是乘客的新手,我无法确定在哪里解决他的错误。 Cap 部署到服务器就好了,但即使重新启动,应用程序也不会启动。我从哪开始呢?

另外,这是passenger.log。应用程序 development.log 是完全空的。

我应该补充一点,这是我远程访问的 ubuntu 12.04 服务器。我们使用 cap 进行部署,并使用chef 来设置盒子。 如果您想知道,我已经查看了此链接:https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems

deploy@apitest:/home/apps/digest/current/log$ tail -f passenger.log
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:105:in `eval'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:105:in `preload_app'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:28:in `<main>'

[ 2014-04-17 20:08:52.1202 2620/7f2f2407a700 Pool2/Spawner.h:738 ]: [App 6300 stdout]
[ 2014-04-17 20:08:55.1191 2620/7f2f2407a700 Pool2/Implementation.cpp:849 ]: Could not spawn process for group /home/apps/digest/current#default: An error occured while starting up the preloader.
in 'void Passenger::ApplicationPool2::SmartSpawner::handleErrorResponse(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:455)
in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:558)
in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206)
in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:744)
in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const Passenger::ApplicationPool2::SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:782)

[ 2014-04-17 20:08:55.1194 2620/7f2f22155700 agents/HelperAgent/RequestHandler.h:1975 ]: [Client 20] Cannot checkout session. An error occured while starting up the preloader.
Error page:
uninitialized constant ActiveModel::Serializer (NameError)
/home/apps/digest/releases/20140418000553/app/serializers/v1/category_serializer.rb:2:in `<module:V1>'
/home/apps/digest/releases/20140418000553/app/serializers/v1/category_serializer.rb:1:in `<top (required)>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `each'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `block in eager_load!'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `each'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `eager_load!'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:347:in `eager_load!'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `each'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/apps/digest/releases/20140418000553/config/environment.rb:7:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:105:in `eval'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:105:in `preload_app'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/home/apps/digest/shared/bundle/ruby/2.0.0/gems/passenger-4.0.20/helper-scripts/rack-preloader.rb:28:in `<main>'

最佳答案

我注意到:uninitialized constant ActiveModel::Serializer (NameError)
这是 active_model_serializers gem 。

看起来它没有安装或在 Gemfile 中。我已经看到这种情况发生(使用其他 gem),我在我的开发箱上本地安装但忘记包含在 Gemfile 中。

关于ruby-on-rails - 乘客 Rails 4 应用程序启动 = 未初始化的常量 ActiveModel::Serializer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23145519/

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