Вопрос:

How to setup spree_static_content with spree 3.X and rails 5 to generate static pages

ruby-on-rails-5 spree

250 просмотра

1 ответ

1501 Репутация автора

I have been trying to setup gem spree_static_content with spree 3.X and rails 5 but there are endless errors (migrations not running, gem dependencies) which are coming. Documentation is outdated and no help on any of the gems and spree commerce project. If someone has recently used these projects please share the debugging results.

Автор: Pikachu-go Источник Размещён: 11.11.2017 07:14

Ответы (1)


0 плюса

1501 Репутация автора

Решение

When setting up spree_static_content gem with Rails 5.x and spree 3.x there are various errors you will get when you add only gem spree_static_content to your Gemfile. Install following gems to your Gemfile and you will not get any error and will easily setup cms for static content for your application.

gem 'spree_static_content', github: 'spree-contrib/spree_static_content'

gem 'globalize', git: 'https://github.com/globalize/globalize'
gem 'activemodel-serializers-xml'

gem 'spree_i18n', github: 'spree-contrib/spree_i18n'
gem 'spree_globalize', github: 'spree-contrib/spree_globalize'

Next, run following commands

bundle install
bundle exec rails g spree_i18n:install
bundle exec rails g spree_globalize:install
bundle exec rails g spree_static_content:install

Now, simply create pages from admin but don't forget to select the store-name checkbox for route to work for spree 3.x.

Автор: Pikachu-go Размещён: 13.11.2017 07:40
Вопросы из категории :
32x32