Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

ActiveRecord::StatementInvalid (Could not find table 'spree_pages') #227

Open
cgcmart opened this issue Jan 29, 2017 · 0 comments
Open

ActiveRecord::StatementInvalid (Could not find table 'spree_pages') #227

cgcmart opened this issue Jan 29, 2017 · 0 comments

Comments

@cgcmart
Copy link

cgcmart commented Jan 29, 2017

spree store homepage not given, that is, Rails is unable to handle requests for this static content by serving it from the public directory. It's a kind of "500" error caused by spree_static_content.
In my gemfile:
gem 'spree_static_content', github: 'spree-contrib/spree_static_content'
bundled and db migrated
gem installed show:
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree_static_content-41ea4c079bf9. I do not know if it's the same as this repository.
here is error log:
I, [2017-01-29T12:01:12.803149 #17900] INFO -- : Started GET "/robots.txt" for 66.249.75.29 at 2017-01-29 12:01:12 -0500 F, [2017-01-29T12:01:12.805271 #17900] FATAL -- : F, [2017-01-29T12:01:12.805309 #17900] FATAL -- : ActiveRecord::StatementInvalid (Could not find table 'spree_pages'): F, [2017-01-29T12:01:12.805334 #17900] FATAL -- : F, [2017-01-29T12:01:12.805373 #17900] FATAL -- : activerecord (5.0.1) lib/active_record/connection_adapters/sqlite3_adapter.rb:429:in table_structure'
activerecord (5.0.1) lib/active_record/connection_adapters/sqlite3_adapter.rb:304:in columns' activerecord (5.0.1) lib/active_record/connection_adapters/schema_cache.rb:56:in columns'
activerecord (5.0.1) lib/active_record/connection_adapters/schema_cache.rb:62:in columns_hash' activerecord (5.0.1) lib/active_record/model_schema.rb:441:in load_schema!'
activerecord (5.0.1) lib/active_record/attributes.rb:233:in load_schema!' activerecord (5.0.1) lib/active_record/attribute_decorators.rb:28:in load_schema!'
activerecord (5.0.1) lib/active_record/model_schema.rb:436:in load_schema' activerecord (5.0.1) lib/active_record/model_schema.rb:349:in attribute_types'
activerecord (5.0.1) lib/active_record/model_schema.rb:368:in type_for_attribute' activerecord (5.0.1) lib/active_record/table_metadata.rb:34:in type'
activerecord (5.0.1) lib/active_record/relation/predicate_builder.rb:165:in build_bind_param' activerecord (5.0.1) lib/active_record/relation/predicate_builder.rb:124:in block in create_binds_for_hash'
activerecord (5.0.1) lib/active_record/relation/predicate_builder.rb:100:in each' activerecord (5.0.1) lib/active_record/relation/predicate_builder.rb:100:in create_binds_for_hash'
activerecord (5.0.1) lib/active_record/relation/predicate_builder.rb:36:in create_binds' activerecord (5.0.1) lib/active_record/relation/where_clause_factory.rb:20:in build'
activerecord (5.0.1) lib/active_record/relation/query_methods.rb:632:in where!' activerecord (5.0.1) lib/active_record/relation/query_methods.rb:625:in where'
activerecord (5.0.1) lib/active_record/querying.rb:10:in where' /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree_static_content-41ea4c079bf9/app/models/spree/page.rb:12:in block in class:Page'
activerecord (5.0.1) lib/active_record/scoping/named.rb:159:in instance_exec' activerecord (5.0.1) lib/active_record/scoping/named.rb:159:in block (2 levels) in scope'
activerecord (5.0.1) lib/active_record/relation.rb:351:in scoping' activerecord (5.0.1) lib/active_record/scoping/named.rb:159:in block in scope'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree_static_content-41ea4c079bf9/lib/spree_static_content.rb:20:in matches?' actionpack (5.0.1) lib/action_dispatch/routing/mapper.rb:38:in block in matches?'
actionpack (5.0.1) lib/action_dispatch/routing/mapper.rb:37:in each' actionpack (5.0.1) lib/action_dispatch/routing/mapper.rb:37:in all?'
actionpack (5.0.1) lib/action_dispatch/routing/mapper.rb:37:in matches?' actionpack (5.0.1) lib/action_dispatch/routing/mapper.rb:44:in serve'
actionpack (5.0.1) lib/action_dispatch/journey/router.rb:39:in block in serve' actionpack (5.0.1) lib/action_dispatch/journey/router.rb:26:in each'
actionpack (5.0.1) lib/action_dispatch/journey/router.rb:26:in serve' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:725:in call'
railties (5.0.1) lib/rails/engine.rb:522:in call' railties (5.0.1) lib/rails/railtie.rb:193:in public_send'
railties (5.0.1) lib/rails/railtie.rb:193:in method_missing' actionpack (5.0.1) lib/action_dispatch/routing/mapper.rb:17:in block in class:Constraints'
actionpack (5.0.1) lib/action_dispatch/routing/mapper.rb:46:in serve' actionpack (5.0.1) lib/action_dispatch/journey/router.rb:39:in block in serve'
actionpack (5.0.1) lib/action_dispatch/journey/router.rb:26:in each' actionpack (5.0.1) lib/action_dispatch/journey/router.rb:26:in serve'
actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:725:in call' versioncake (3.1.0) lib/versioncake/rack/middleware.rb:17:in call'
warden (1.2.7) lib/warden/manager.rb:36:in block in call' warden (1.2.7) lib/warden/manager.rb:35:in catch'
warden (1.2.7) lib/warden/manager.rb:35:in call' rack (2.0.1) lib/rack/etag.rb:25:in call'
rack (2.0.1) lib/rack/conditional_get.rb:25:in call' rack (2.0.1) lib/rack/head.rb:12:in call'
rack (2.0.1) lib/rack/session/abstract/id.rb:222:in context' rack (2.0.1) lib/rack/session/abstract/id.rb:216:in call'
actionpack (5.0.1) lib/action_dispatch/middleware/cookies.rb:613:in call' actionpack (5.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in block in call'
activesupport (5.0.1) lib/active_support/callbacks.rb:97:in __run_callbacks__' activesupport (5.0.1) lib/active_support/callbacks.rb:750:in _run_call_callbacks'
activesupport (5.0.1) lib/active_support/callbacks.rb:90:in run_callbacks' actionpack (5.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in call'
actionpack (5.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in call' actionpack (5.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:49:in call'
actionpack (5.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in call' railties (5.0.1) lib/rails/rack/logger.rb:36:in call_app'
railties (5.0.1) lib/rails/rack/logger.rb:24:in block in call' activesupport (5.0.1) lib/active_support/tagged_logging.rb:69:in block in tagged'
activesupport (5.0.1) lib/active_support/tagged_logging.rb:26:in tagged' activesupport (5.0.1) lib/active_support/tagged_logging.rb:69:in tagged'
railties (5.0.1) lib/rails/rack/logger.rb:24:in call' actionpack (5.0.1) lib/action_dispatch/middleware/request_id.rb:24:in call'
rack (2.0.1) lib/rack/method_override.rb:22:in call' rack (2.0.1) lib/rack/runtime.rb:22:in call'
activesupport (5.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' actionpack (5.0.1) lib/action_dispatch/middleware/executor.rb:12:in call'
rack (2.0.1) lib/rack/sendfile.rb:111:in call' railties (5.0.1) lib/rails/engine.rb:522:in call'
puma (3.7.0) lib/puma/configuration.rb:226:in call' puma (3.7.0) lib/puma/server.rb:578:in handle_request'
puma (3.7.0) lib/puma/server.rb:415:in process_client' puma (3.7.0) lib/puma/server.rb:275:in block in run'
puma (3.7.0) lib/puma/thread_pool.rb:120:in block in spawn_thread'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant