Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find table 'spree_pages' #30

Closed
Steco17 opened this issue Jun 29, 2019 · 5 comments · Fixed by #49
Closed

Could not find table 'spree_pages' #30

Steco17 opened this issue Jun 29, 2019 · 5 comments · Fixed by #49
Assignees
Labels

Comments

@Steco17
Copy link

Steco17 commented Jun 29, 2019

Hello am trying to install thins gem went through as intructed that is
added this gem:
gem 'solidus_static_content', github: 'solidusio-contrib/solidus_static_content'
and ran :
bundle exec rails g solidus_static_content:install
but after restarting my server i got an error

Could not find table 'spree_pages'

can i get any help here please?
am using ruby 2.5.1
rails 5.2.0 and with solidus
here is the screenshot

Screenshot_2019-06-29 Action Controller Exception caught

@jacobherrington
Copy link

jacobherrington commented Jun 29, 2019

Hi @Steco17, I haven't actually really worked with this extension, but the first questions I have are 1) What version of Solidus are you using? 2) Did you run the migrations? That should have created the table.

Would you mind seeing if you can run Spree::Pages.connection from the console?

As soon as I have the time, I'll try to reproduce the error 👍

@Steco17
Copy link
Author

Steco17 commented Jun 30, 2019

Hi, @jacobherrington thanks. Yes I did the migration after installing the gem and am using solidus 2.8.4
I ran Spree::Pages.connection and Spree::Pages.connection: command not found was the output.
True, the table isn't created.

@Steco17
Copy link
Author

Steco17 commented Jul 5, 2019

Any help here?

@forkata
Copy link

forkata commented Jul 6, 2019

Do you get anything if you try to install the migrations from the gem manually by running
bundle exec rake railties:install:migrations FROM=solidus_static_content

That should copy the migrations from the gem into your app's db/migrate folder, if they are not already there and then you can run them with rake db:migrate.

@gildardoperez
Copy link

@Steco17 I had the same issue run:

> bundle exec rake railties:install:migrations FROM=spree_static_content

*Notice the "spree" instead of the "Solidus"

Successful output should look like this:

Copied migration 20190820160807_create_pages.spree_static_content.rb from spree_static_content
Copied migration 20190820160808_extend_pages.spree_static_content.rb from spree_static_content
Copied migration 20190820160809_add_visible_to_pages.spree_static_content.rb from spree_static_content
Copied migration 20190820160810_add_default_true_to_visible_for_page.spree_static_content.rb from spree_static_content
Copied migration 20190820160811_add_index_for_page.spree_static_content.rb from spree_static_content
Copied migration 20190820160812_add_meta_fields_to_pages.spree_static_content.rb from spree_static_content
Copied migration 20190820160813_add_layout_to_pages.spree_static_content.rb from spree_static_content
Copied migration 20190820160814_add_show_in_sidebar_option_to_pages.spree_static_content.rb from spree_static_content
Copied migration 20190820160815_add_meta_title_to_page.spree_static_content.rb from spree_static_content
Copied migration 20190820160816_add_render_as_partial_for_layout_for_spree_pages.spree_static_content.rb from spree_static_content
Copied migration 20190820160817_add_pages_stores.spree_static_content.rb from spree_static_content

> bin/rails db:migrate RAILS_ENV=development

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

Successfully merging a pull request may close this issue.

5 participants