尝试使用ruby 1.9.2 rails 3.2.1和refinerycms 2.0.1运行新的refinerycms应用程序时,生产中出现此错误。我很好奇导致这个问题,因为我的应用程序已经开箱即用。
在2012-03-11 01:21:11 -0800开始获取127.0.0.1的“/” 由Refinery处理:: PagesController #home为HTML 参数:{“locale”=>:en} 在2ms完成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:in
columns'
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:in
yield'
activerecord(3.2.1)lib / active_record / model_schema.rb:228:default'
activerecord (3.2.1) lib/active_record/model_schema.rb:228:in
列'
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:in
column_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:in
method_missing'
refinerycms-authentication(2.0.1)app / models / refinery / role.rb:14:in []'
refinerycms-core (2.0.1) lib/refinery/application_controller.rb:53:in
just_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:in
运行 _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:in
process_action'
actionpack(3.2.1)lib / action_controller / metal / rescue.rb:29:在process_action中的process_action'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:30:in
块中
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:in
instrument'
activesupport(3.2.1)lib / active_support / notifications.rb:123:in instrument'
actionpack (3.2.1) lib/action_controller/metal/instrumentation.rb:29:in
process_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:in
process_action'
actionpack(3.2.1)lib / abstract_controller / base.rb:121:in process'
actionpack (3.2.1) lib/abstract_controller/rendering.rb:45:in
process'
actionpack(3.2.1)lib / action_controller / metal.rb:203:in dispatch'
actionpack (3.2.1) lib/action_controller/metal/rack_delegation.rb:14:in
dispatch'
actionpack(3.2.1)lib / action_controller / metal.rb:246:in block in action'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:in
call'
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:in
call'
旅程(1.0.3)lib / journey / router.rb:68:in block in call'
journey (1.0.3) lib/journey/router.rb:56:in
each'
旅程(1.0.3)lib / journey / router.rb:56:in call'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:589:in
call'
railties(3.2.1)lib / rails / engine.rb:479:in call'
railties (3.2.1) lib/rails/railtie/configurable.rb:30:in
method_missing'
旅程(1.0.3)lib / journey / router.rb:68:in block in call'
journey (1.0.3) lib/journey/router.rb:56:in
each'
旅程(1.0.3)lib / journey / router.rb:56:in call'
actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:589:in
call'
warden(1.1.1)lib / warden / manager.rb:35:in block in call'
warden (1.1.1) lib/warden/manager.rb:34:in
catch'
warden(1.1.1)lib / warden / manager.rb:34:in call'
actionpack (3.2.1) lib/action_dispatch/middleware/best_standards_support.rb:17:in
call'
rack(1.4.1)lib / rack / etag.rb:23:in call'
rack (1.4.1) lib/rack/conditionalget.rb:25:in
call'
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:in
call'
actionpack(3.2.1)lib / action_dispatch / middleware / flash.rb:242:in call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in
context'
rack(1.4.1)lib / rack / session / abstract / id.rb:200:in call'
actionpack (3.2.1) lib/action_dispatch/middleware/cookies.rb:338:in
call'
dragonfly(0.9.10)lib / dragonfly / cookie_monster.rb:9:in call'
activerecord (3.2.1) lib/active_record/query_cache.rb:64:in
call'
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:in
block 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:in
run_callbacks'
actionpack(3.2.1)lib / action_dispatch / middleware / callbacks.rb:27:in call'
dragonfly (0.9.10) lib/dragonfly/middleware.rb:13:in
call'
dragonfly(0.9.10)lib / dragonfly / middleware.rb:13:in call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in
forward'
rack-cache(1.2)lib / rack / cache / context.rb:245:in fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in
lookup'
rack-cache(1.2)lib / rack / cache / context.rb:66:in call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in
call'
rack-cache(1.2)lib / rack / cache / context.rb:136:in forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in
fetch'
rack-cache(1.2)lib / rack / cache / context.rb:185:in lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in
call!'
rack-cache(1.2)lib / rack / cache / context.rb:51:in call'
actionpack (3.2.1) lib/action_dispatch/middleware/remote_ip.rb:31:in
call'
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:in
call'
railties(3.2.1)lib / rails / rack / logger.rb:26:in call_app'
railties (3.2.1) lib/rails/rack/logger.rb:16:in
call'
actionpack(3.2.1)lib / action_dispatch / middleware / request_id.rb:22:in call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in
call'
rack(1.4.1)lib / rack / runtime.rb:17:in call'
activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in
call'
rack(1.4.1)lib / rack / lock.rb:15:in call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in
forward'
rack-cache(1.2)lib / rack / cache / context.rb:245:in fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in
lookup'
rack-cache(1.2)lib / rack / cache / context.rb:66:in call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in
call'
railties(3.2.1)lib / rails / engine.rb:479:in call'
railties (3.2.1) lib/rails/application.rb:220:in
call'
rack(1.4.1)lib / rack / content_length.rb:14:in call'
railties (3.2.1) lib/rails/rack/log_tailer.rb:14:in
call'
thin(1.3.1)lib / thin / connection.rb:80:in block in pre_process'
thin (1.3.1) lib/thin/connection.rb:78:in
catch'
thin(1.3.1)lib / thin / connection.rb:78:in pre_process'
thin (1.3.1) lib/thin/connection.rb:53:in
process'
thin(1.3.1)lib / thin / connection.rb:38:in receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in
run_machine'
eventmachine(0.12.10)lib / eventmachine.rb:256:in run'
thin (1.3.1) lib/thin/backends/base.rb:61:in
start'
thin(1.3.1)lib / thin / server.rb:159:in start'
rack (1.4.1) lib/rack/handler/thin.rb:13:in
run'
rack(1.4.1)lib / rack / server.rb:265:in start'
railties (3.2.1) lib/rails/commands/server.rb:70:in
start'
railties(3.2.1)lib / rails / commands.rb:55:in block in <top (required)>'
railties (3.2.1) lib/rails/commands.rb:50:in
tap'
railties(3.2.1)lib / rails / commands.rb:50:in <top (required)>'
script/rails:6:in
require'
script / rails:6:in''
答案 0 :(得分:3)
你需要运行“rake db:migrate&#39;在你的rails应用程序中。这将在db中创建特定的表。我昨天得到了同样的错误,这解决了它。