2

当尝试使用 ruby​​ 1.9.2 rails 3.2.1 和refinerycms 2.0.1 运行新的refinerycms 应用程序时,我在生产中遇到此错误。我很好奇导致这种情况的原因,因为我的应用程序是开箱即用的。

在 2012-03-11 01:21:11 -0800 开始 GET "/" for 127.0.0.1 由 Refinery::PagesController#home 作为 HTML 参数处理:{"locale"=>:en} 在 2 毫秒内完成 500 内部服务器错误

ActiveRecord::StatementInvalid(找不到表'refinery_roles'):activerecord (3.2.1) lib/active_record/connection_adapters/sqlite_adapter.rb:470:in table_structure' activerecord (3.2.1) lib/active_record/connection_adapters/sqlite_adapter.rb:351:incolumns' activerecord (3.2.1) lib/active_record/connection_adapters/schema_cache.rb :12:in block in initialize' activerecord (3.2.1) lib/active_record/model_schema.rb:228:inyield' activerecord (3.2.1) lib/active_record/model_schema.rb:228:in default' activerecord (3.2.1) lib/active_record/model_schema.rb:228:incolumns' activerecord (3.2.1) lib/active_record/model_schema.rb:248:in column_names' activerecord (3.2.1) lib/active_record/model_schema.rb:261:incolumn_methods_hash' activerecord (3.2.1) lib/active_record/dynamic_matchers.rb:69:in all_attributes_exists?' activerecord (3.2.1) lib/active_record/dynamic_matchers.rb:27:inmethod_missing'refinerycms-authentication (2.0.1) app/models/refinery/role.rb:14:in []' refinerycms-core (2.0.1) lib/refinery/application_controller.rb:53:injust_installed?' refinerycms -core (2.0.1) lib/refinery/application_controller.rb:73:in refinery_user_required?' activesupport (3.2.1) lib/active_support/callbacks.rb:429:inrun _157096296043845177__process_action_ 370528316792604795_callbacks' activesupport (3.2.1) lib/active_support/callbacks.rb:405:in __run_callback' activesupport (3.2.1) lib/active_support/callbacks.rb:385:in_run_process_action_callbacks' activesupport (3.2.1) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (3.2.1) lib/abstract_controller/callbacks.rb:17:inprocess_action' actionpack (3.2.1) lib/action_controller/ metal/rescue.rb:29:in process_action' actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:30:inblock in process_action' activesupport (3.2.1) lib/active_support/notifications.rb:123:in block in instrument' activesupport (3.2.1) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (3.2.1) lib/active_support/notifications.rb:123:in instrument' actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:29:inprocess_action ' actionpack (3.2.1) lib/action_controller/metal/params_wrapper.rb:205:in process_action' activerecord (3.2.1) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (3.2.1) lib/abstract_controller/base.rb:121:in process' actionpack (3.2.1) lib/abstract_controller/rendering.rb:45:inprocess' actionpack (3.2.1) lib/action_controller /metal.rb:203:in dispatch' actionpack (3.2.1) lib/action_controller/metal/rack_delegation.rb:14:indispatch' actionpack (3.2.1) lib/action_controller/metal.rb:246:inblock in action' actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:incall' actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:in dispatch' actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:30:incall' Journey (1.0.3) lib/journey/router.rb:68:in block in call' journey (1.0.3) lib/journey/router.rb:56:ineach' Journey (1.0.3) lib/ travel/router.rb:56:in call' actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:589:incall' railties (3.2.1) lib/rails/engine.rb:479:in call' railties (3.2.1) lib/rails/railtie/configurable.rb:30:inmethod_missing' Journey (1.0.3) lib/journey/router.rb:68:in block in call' journey (1.0.3) lib/journey/router.rb:56:ineach' Journey (1.0.3) lib/journey/router.rb:56:in call'warden call' actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:589:in(1.1.1) lib/warden/manager.rb:35:in block in call' warden (1.1.1) lib/warden/manager.rb:34:incatch'warden (1.1.1) lib/warden/manager.rb :34:in call' actionpack (3.2.1) lib/action_dispatch/middleware/best_standards_support.rb:17:incall' rack (1.4.1) lib/rack/etag.rb:23:in call' rack (1.4.1) lib/rack/conditionalget.rb:25:incall' actionpack (3.2.1) lib/action_dispatch/middleware/head.rb:14:in call' actionpack (3.2.1) lib/action_dispatch/middleware/params_parser.rb:21:incall' actionpack (3.2. 1) lib/action_dispatch/middleware/flash.rb:242:in call' rack (1.4.1) lib/rack/session/abstract/id.rb:205:incontext' rack (1.4.1) lib/rack/session/abstract/id.rb:200:incall' actionpack (3.2.1) lib/action_dispatch/middleware/cookies.rb:338:incall'dragonfly (0.9.10) lib/dragonfly/cookie_monster.rb:9:in call' activerecord (3.2.1) lib/active_record/query_cache.rb:64:incall' activerecord (3.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in call' actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb:28:inblock in call' activesupport (3.2. 1) lib/active_support/callbacks.rb:405:in _run__215402801072025143__call__3538488024182103853__callbacks' activesupport (3.2.1) lib/active_support/callbacks.rb:405:in__run_callback' activesupport (3.2.1) lib/active_support/callbacks.rb:385:in _run_call_callbacks' activesupport (3.2.1) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (3.2.1) lib/action_dispatch/middleware/callbacks.rb: 27:in call' dragonfly (0.9.10) lib/dragonfly/middleware.rb:13:incall'dragonfly (0.9.10) lib/dragonfly/middleware.rb:13:in call' rack-cache (1.2) lib/rack/cache/context.rb:136:inforward' rack-cache (1.2) lib/rack/cache/context.rb:245:in fetch' rack-cache (1.2) lib/rack/cache/context.rb:185:inlookup' rack-cache (1.2 ) lib/rack/cache/context.rb:66:in call!' rack-cache (1.2) lib/rack/cache/context.rb:51:incall' rack-cache (1.2) lib/rack/cache/context.rb:136:in forward' rack-cache (1.2) lib/rack/cache/context.rb:245:infetch' rack-cache (1.2) lib/rack/cache/context .rb:185:inlookup' rack-cache (1.2) lib/rack/cache/context.rb:66:in称呼!' rack-cache (1.2) lib/rack/cache/context.rb:51:in call' actionpack (3.2.1) lib/action_dispatch/middleware/remote_ip.rb:31:incall' actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:16:in call' actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56:incall' railties (3.2.1) lib/ rails/rack/logger.rb:26:in call_app' railties (3.2.1) lib/rails/rack/logger.rb:16:incall' actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:incall' rack (1.4.1) lib/rack/runtime.rb:17:调用中call' activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in的机架 (1.4.1) lib/rack/lock.rb:15:in call' rack-cache (1.2) lib/rack/cache/context.rb:136:inforward 机架缓存 (1.2) lib/rack/cache/context.rb:245:in fetch' rack-cache (1.2) lib/rack/cache/context.rb:185:inlookup 机架缓存 (1.2) 库/rack/cache/context.rb:66:in call!' rack-cache (1.2) lib/rack/cache/context.rb:51:incall' railties (3.2.1) lib/rails/engine.rb:479:in call' railties (3.2.1) lib/rails/application.rb:220:incall' rack (1.4.1) lib/rack/content_length.rb:14:incall' railties (3.2.1) lib/rails/rack/log_tailer.rb:14:in调用'thin (1.3.1) lib/thin/connection.rb:80:in block in pre_process' thin (1.3.1) lib/thin/connection.rb:78:incatch'thin (1.3.pre_process' thin (1.3.1) lib/thin/connection.rb:53:in进程'thin (1.3.1) lib/thin/connection.rb:38:in receive_data' eventmachine (0.12.10) lib/eventmachine.rb:256:inrun_machine' eventmachine (0.12.10) lib/eventmachine.rb:256:in start'thin run' thin (1.3.1) lib/thin/backends/base.rb:61:in(1.3.1) lib/thin/server. rb:159:in start' rack (1.4.1) lib/rack/handler/thin.rb:13:inrun' rack (1.4.1) lib/rack/server.rb:265:in start' railties (3.2.1) lib/rails/commands/server.rb:70:instart' railties (3.2.1) lib/rails/commands.rb:55:in block in <top (required)>' railties (3.2.1) lib/rails/commands.rb:50:intap' railties (3.2.1 ) lib/rails/commands.rb:50:in<top (required)>' script/rails:6:in需要'脚本/rails:6:in `'

4

1 回答 1

3

您需要在 Rails 应用程序中运行“rake db:migrate”。这将在 db 中创建特定于香水的表。我昨天遇到了同样的错误,这解决了它。

于 2012-03-30T10:20:43.323 回答