Git Product home page Git Product logo

spree_themes's Introduction

VinsolSpreeThemes

This extension allows the admin to upload new spree store themes from backend. This extension provides an interface where admin can manage all the themes by editing them, deleting old themes and publishing theme to store for the users.

Admin can even preview the theme after modifying it from the backend before publishing it to the users.

Try Spree Themes for Spree 3-4 with direct deployment on Heroku:

Deploy

Steps to Publish a Theme.

Go to - https://github.com/vinsol-spree-contrib/spree_themes/wiki/Steps-to-Publish-a-Theme

Try Spree Themes with direct deployment on Heroku:

Theme Name Deploy Button Theme Download Link
Big Shop Deploy https://github.com/vinsol-spree-contrib/theme-BigShop/archive/3-3-stable.zip
Classic White Deploy https://github.com/vinsol-spree-contrib/theme-ClassicWhite/archive/3-3-bump.zip
Lattice Deploy https://github.com/vinsol-spree-contrib/theme-LatticeTheme/archive/3-3-stable.zip
Crown Deploy https://github.com/vinsol-spree-contrib/theme-CrownTheme/archive/3-3-bump.zip
Online Store Deploy https://github.com/vinsol-spree-contrib/theme-OnlineStore/archive/3-3-bump.zip
Unite Deploy https://github.com/vinsol-spree-contrib/theme-Unite/archive/3-3-bump.zip
Matrix Deploy https://github.com/vinsol-spree-contrib/theme-Matrix/archive/3-3-bump.zip
Crown Theme 2 Deploy https://github.com/vinsol-spree-contrib/theme-CrownTheme-2/archive/3-3-bump.zip
Shopkeeper Theme Deploy https://github.com/vinsol-spree-contrib/theme-Shopkeeper/archive/3-3-bump.zip
Scrollex Theme Deploy https://github.com/vinsol-spree-contrib/theme-ScrollexTheme/archive/3-3-bump.zip
EStore Theme Deploy https://github.com/vinsol-spree-contrib/theme-EStore/archive/3-3-stable.zip

Download Sample Themes:

For SPREE 3.2

https://github.com/vinsol-spree-contrib/theme-BigShop/archive/3-2-stable.zip

https://github.com/vinsol-spree-contrib/theme-ClassicWhite/archive/3-2-stable.zip

https://github.com/vinsol-spree-contrib/theme-OnlineStore/archive/3-2-stable.zip

https://github.com/vinsol-spree-contrib/theme-CrownTheme/archive/3-2-stable.zip

https://github.com/vinsol-spree-contrib/theme-LatticeTheme/archive/3-2-stable.zip

https://github.com/vinsol-spree-contrib/theme-Matrix/archive/3-2-stable.zip

https://github.com/vinsol-spree-contrib/theme-Unite/archive/3-2-stable.zip

https://github.com/vinsol-spree-contrib/theme-CrownTheme-2/archive/3-2-stable.zip

Requirements

This extension currently supports Ruby 2.4.2, Rails 5.1 and Spree 3.4.

Features

Some of the current functionalities are:-

  1. Upload the theme
  2. Preview the theme.
  3. Publish the theme on spree store.
  4. Download the theme.
  5. Remove the uploaded theme.
  6. Modify the uploaded / published theme.

Installation

  1. Add this extension to your Gemfile:

For SPREE 3.4

gem 'vinsol_spree_themes', github: 'vinsol-spree-contrib/spree_themes', branch: 'master'

For SPREE 3.3

gem 'vinsol_spree_themes', github: 'vinsol-spree-contrib/spree_themes', branch: '3-3-stable'

For SPREE 3.2

gem 'vinsol_spree_themes', github: 'vinsol-spree-contrib/spree_themes', branch: '3-2-stable'

Note:- Add this gem at the end of your gemfile as it has some sprocket-rails dependency and needs to be loaded after all gems are loaded.

  1. Also add the following gem above the extension:

    gem 'sprockets-helpers', '~> 1.2.1'

    Note:- This gem is dependent for the preview feature.

  2. Install the gem using Bundler:

bundle install
  1. Copy & run migrations
bundle exec rails g vinsol_spree_themes:install
  1. Restart your server
rails server

Usage

Development

Make sure to set the following config in environment file development.rb.

config.assets.debug = false

After installing the extension, admin will see a tab vinsol spree themes on left sidebar of admin panel. Or you can visit the link

 http://localhost:3000/admin/themes

Then, admin uploads the new theme in zip file(Download sample themes from the links added below). Once uploaded, admin can preview the theme and also modify it accordingly through the editor.

Theme templates can be modified through the editor. Later theme can be published for the spree store users.

Note:- Before publishing the theme, admin needs to compile it using the link provided with other options for all assets to load properly.

Once the extension is installed, admin gets a spree store default theme uploaded on the system and is published for the store users.

Besides preview and publishing, admin can delete the uploaded theme or download it in zip format.

Themes

Some spree store themes can be cloned from the following link:-

  1. https://github.com/vinsol-spree-contrib/theme-ClassicWhite.git
  2. https://github.com/vinsol-spree-contrib/theme-BigShop.git

After clonning, zip the files of the theme and upload the zip file from the admin interface.

Yay!! new theme is ready to be published.

Theme Structure

Theme file structure for the zip file to be uploaded:-

  • Theme.zip
    • javascripts
    • stylesheets
    • images
    • views: These views will be the spree frontend view directory.
    • snapshot.png: This is the snapshot for the theme visible at backend.
    • meta_info.yml: This .yml file contains meta info of the theme.

Note:- When uploading, files starting with '__' or '.' will be ignored

Create a meta_info.yml file on the theme directory which contains the meta info of the theme. Format of the file should be following:-

  • name: Name of the theme
  • version: Version of the theme
  • authors: Authors of the theme

Note:- Add new javascript files to javascripts directory and new stylesheet files to stylesheets directory. For adding js and css manifest files, file name should be script.manifest.js or style.manifest.css. If using sass, use style.manifest.scss files instead of .css.

Developers

If you wish to modify the theme directly from the filesystem, follow these steps:-

  1. Publish the theme which need to be updated/modified.

  2. Update the theme assets, stylesheets, scripts and templates from the path.

public/vinsol_spree_themes/<theme_name>/

or

public/vinsol_spree_themes/current/
  1. If application is running, reload the store page and you will see the changes on the browser.

  2. Once all the changes are done and final theme is ready, run the following rake task to sync the updated files with the database.

bundle exec rake db:sync_templates THEME_NAME=<theme_name>

Downloading Theme

Admin can download the theme in the zip format after modifying it. While uploading the downloaded theme, admin needs to follow the below steps:-

  1. Make sure to change the theme name (Theme name is the name of the zip file).

  2. Make sure to update the meta info of the theme in the file meta_info.yml when the theme is updated.

  3. Extract the downloaded zip file and then need to compress the files within the extracted folder. Otherwise, the theme structure will change and there will be issue while uploading.

Production Setup

  1. Set the following configuration for production environment in environment file production.rb:
config.assets.compile = true
config.public_file_server.enabled = true
  1. Also, set the assets compressors in production.rb file.
config.assets.js_compressor = :uglifier
config.assets.css_compressor = :sass
  1. For Capistrano: Add the following path to the shared linked dir in deploy.rb file.
set :linked_dirs, %w( public/vinsol_spree_themes )

Assumptions

While developing this extensions, we faced few issues related to assets precompilation, spree fragment caching and rails template caching. To resolve these issues we made few assumptions:

  1. For clearing cache, we used rails resolvers. We are assuming that whenever the template is modified, we are clearing the cache.

  2. When previewing the theme, we remove the cache directory under tmp/cache for proper theme rendering.

  3. We are assuming the theme zip filename to be the theme name and admin cannot upload the other theme with the same name.

  4. We need to compile and minify the assets before publishing the theme using the compile link for proper rendering of theme.

  5. Rails app is using centeral cache store. So that Rails.cache.clear can flush cache for all application servers.

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'vinsol_spree_themes/factories'

RoadMaps

Some other features which need to work on and are under development:-

  1. Theme revisions and rollback to previous theme versions.
  2. Maintaining the themes in multiple instances / cluster mode.
  3. Extension Dependencies for Spree < 3.2 and Rails 4.
  4. Update theme images like scripts and styles from admin interface.
  5. Flexibility to modify other spree extension views according to the theme.
  6. Displaying Theme information using theme meta info.

Contributing

If you'd like to contribute, please follow the below steps:-

  1. Fork the repo.
  2. Clone your repo.
  3. Run bundle install.
  4. Run bundle exec rake test_app to create the test application in spec/test_app.
  5. Make your changes.
  6. Ensure specs pass by running bundle exec rspec spec.
  7. Submit your pull request.

Credits

vinsol.com: Ruby on Rails, iOS and Android developers

Copyright (c) 2017 vinsol.com, released under the New MIT License

spree_themes's People

Contributors

artplan1 avatar ashubuddy89 avatar bansalakhil avatar himanshumishra31 avatar jitendra avatar pareshgupta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_themes's Issues

The `branch` option for `gem 'vinsol_spree_themes'` is not allowed.

I tried to do a bundle install on:
gem 'vinsol_spree_themes', branch: '3-2-stable'

and I got an error saying that branch option for gem is not allowed. I did not stop there, I tried to resolve it by adding the sprockets-helper and I got this error:

[!] There was an error parsing `Gemfile`: The `branch` option for `gem 'vinsol_spree_themes'` is not allowed. Only gems with a git source can specify a branch. Bundler cannot continue.

 #  from /Users/danale/Projects/spreeshop/Gemfile:59
 #  -------------------------------------------
 #  gem 'sprockets-helpers', '~> 1.2.1'
 >  gem 'vinsol_spree_themes', branch: '3-2-stable'

I then tried it this way:

gem 'vinsol_spree_themes', :github => 'vinsol-spree-contrib/spree_themes' :branch => '3-2-stable'

I got the same error. By the way, it's written as you see above because I have this in my gemfile:

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

I then tried this:

gem 'spree', '~> 3.3.0'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'
gem 'sprockets-helpers', '~> 1.2.1'
gem 'vinsol_spree_themes', github: 'vinsol-spree-contrib/spree_themes' branch: '3-2-stable'

Still nothing, I get these errors:

[!] There was an error parsing `Gemfile`: syntax error, unexpected tIDENTIFIER, expecting end-of-input - ...ee-contrib/spree_themes' branch: '3-2-stable'
...                               ^. Bundler cannot continue.

 #  from /Users/danale/Projects/spreeshop/Gemfile:39
 #  -------------------------------------------
 #  gem 'sprockets-helpers', '~> 1.2.1'
 >  gem 'vinsol_spree_themes', github: 'vinsol-spree-contrib/spree_themes' branch: '3-2-stable'
 #
 #  -------------------------------------------

Any help would be appreciated.

Not able to upload the theme

While uploading your theme-BigShop-master or theme-ClassicWhite-3-3-bump themes i am getting the attached error. I have following spree and vinsol related Gems
gem 'spree', '~> 3.3'

gem 'spree_auth_devise', '~> 3.3'

gem 'spree_gateway', '~> 3.3'

gem 'sprockets-helpers', '~> 1.2.1'

gem 'vinsol_spree_themes', :git => 'https://github.com/vinsol-spree-contrib/spree_themes.git', :branch => '3-3-stable'

vinsol_theme_upload

ActionView::Template::Error (No route matches {:action=>"show", :controller=>"spree/admin/themes_preview", :theme_id=>nil}

Hi,
First of all it's great, you've created themes for Spree and I'd love to try some of them out.
At the moment I'm a bit stuck as I get this error:

Showing /mnt/c/sites/myappname/app/views/spree/layouts/spree_application.html.erb where line #21 raised:

No route matches {:action=>"show", :controller=>"spree/admin/themes_preview", :theme_id=>nil}, possible unmatched constraints: [:theme_id]

<%= render partial: 'spree/shared/sidebar' if content_for? :sidebar %>

<div id="content" class="<%= !content_for?(:sidebar) ? "col-sm-12" : "col-sm-8 col-md-9" %>" data-hook>
  <%= flash_messages %>
  <%= yield %>
</div>

My Gemfile looks like this:

gem 'spree', '3.4.5'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'
gem 'sprockets-helpers', '~> 1.2.1'
gem 'vinsol_spree_themes', github: 'vinsol-spree-contrib/spree_themes', branch: 'master'

I have Ruby 2.5.1 and Rails 5.1.6
So far I've tried to do something what was suggested here, however it does not work.

I'd be happy for any help. Thank you!

Theme upload not working

Can't use theme:

  1. Snapshot not displaying
  2. Preview display the current (default) theme
  3. Template, show empty page

GEMS

gem 'sprockets-helpers', '~> 1.2.1'
gem 'spree', '~> 3.3.0'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'
gem 'spree_i18n', github: 'spree-contrib/spree_i18n'
gem 'spree_globalize', github: 'spree-contrib/spree_globalize', branch: 'master'
gem 'globalize', github: 'globalize/globalize'
gem 'activemodel-serializers-xml'
gem 'vinsol_spree_themes'

capture d ecran 2017-09-09 a 23 27 57

capture d ecran 2017-09-09 a 23 44 03

Theme not being applied after compile and publish

Hi installed the spree_themes extension to spree 3.3.1 and then added ur theme bigshop (master branch)
It adds, compiles and publishes successfully in admin. but when i check any of the pages in frontend its not being applied. they are still on default theme. although the theme is applied when in preview mode.
i am in development mode and config.assets.debug is set to false.

Mysql2::Error: Data too long for column 'body' at row 1: INSERT INTO `spree_themes_templates

When using mysql, importing the theme "Unite" fails with a database error.

ActiveRecord::ValueTooLong in Spree::Admin::ThemesController#upload

Mysql2::Error: Data too long for column 'body' at row 1: INSERT INTO spree_themes_templates (name, body, path, locale, theme_id, created_at, updated_at) VALUES ('slick.js', '/*\n _ _ _ \n | () | | __ ()\n/ | | |/ | |/ / | / |\n\ \ | | (| < _ | \ \\n|/||\||\()/ |/\n |/\n\n Version: 1.8.0\n Author: Ken Wheeler\n Website: http://kenwheeler.github.io\n Docs: http://kenwheeler.github.io/slick\n Repo: http://github.com/kenwheeler/slick\n Issues: http://github.com/kenwheeler/slick/issues\n\n /\n/ global window, document, define, jQuery, setInterval, clearInterval */\n;(function(factory) {\n 'use strict';\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (typeof exports !== 'undefined') {\n module.exports = factory(require('jquery'));\n } else {\n factory(jQuery);\n }\n\n}(function($) {\n 'use strict';\n var Slick = window.Slick || {};\n\n Slick = (function() {\n\n var instanceUid = 0;\n\n function Slick(element, settings) {\n\n var _ = this, dataSettings;\n\n _.defaults = {\n accessibility: true,\n adaptiveHeight: false,\n appendArrows: $(element),\n appendDots: $(element),\n arrows: true,\n asNavFor: null,\n prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Prev..........................................................

And so on. The full dump is really long.

Error while mail is sent on order complete by user

[ActiveJob] [ActionMailer::DeliveryJob] [ebf3dc68-887c-4dc2-ab46-c9021adb22dc] Spree::OrderMailer#confirm_email: processed outbound mail in 1930.0ms
Rendered public/vinsol_spree_themes/current/views/spree/shared/_translations.html.erb (0.8ms)
[ActiveJob] [ActionMailer::DeliveryJob] [ebf3dc68-887c-4dc2-ab46-c9021adb22dc] Error performing ActionMailer::DeliveryJob (Job ID: ebf3dc68-887c-4dc2-ab46-c9021adb22dc) from Async(mailers) in 1932.0ms: ActionView::Template::Error (undefined method cookies' for #<Spree::OrderMailer:0x00007fafc9a0ae08>): /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/controller_helper.rb:14:in cookies'
/Users/lakshya/.rvm/gems/ruby-2.4.2/bundler/gems/spree_themes-0b8801fe8f35/config/initializers/sprockets.rb:66:in preview_by_admin?' /Users/lakshya/.rvm/gems/ruby-2.4.2/bundler/gems/spree_themes-0b8801fe8f35/config/initializers/sprockets.rb:58:in current_theme'
/Users/lakshya/.rvm/gems/ruby-2.4.2/bundler/gems/spree_themes-0b8801fe8f35/config/initializers/sprockets.rb:39:in initialize' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:252:in new'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:252:in block in asset_resolver_strategies' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:251:in map'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:251:in asset_resolver_strategies' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:241:in resolve_asset'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:101:in resolve_asset_path' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/sprockets-rails-3.2.1/lib/sprockets/rails/helper.rb:79:in compute_asset_path'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/asset_url_helper.rb:198:in asset_path' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/asset_url_helper.rb:373:in image_path'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/asset_tag_helper.rb:232:in image_tag' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/spree_core-3.4.4/app/views/spree/shared/_base_mailer_header.html.erb:16:in block in _97b3f658a139044822aa69b23cf1dc9d'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/capture_helper.rb:39:in block in capture' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/capture_helper.rb:203:in with_output_buffer'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/capture_helper.rb:39:in capture' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/tag_helper.rb:272:in content_tag'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/url_helper.rb:198:in link_to' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/spree_core-3.4.4/app/views/spree/shared/_base_mailer_header.html.erb:15:in _97b3f658a139044822aa69b23cf1dc9d'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/template.rb:157:in block in render' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications.rb:168:in instrument'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/template.rb:352:in instrument_render_template' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/template.rb:155:in render'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/deface-1.3.0/lib/deface/action_view_extensions.rb:41:in render' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/partial_renderer.rb:342:in block in render_partial'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/abstract_renderer.rb:42:in block in instrument' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in block in instrument'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in instrument' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in instrument'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/abstract_renderer.rb:41:in instrument' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/partial_renderer.rb:331:in render_partial'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/partial_renderer.rb:310:in render' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/renderer.rb:47:in render_partial'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/renderer.rb:21:in render' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/helpers/rendering_helper.rb:32:in render'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/spree_core-3.4.4/app/views/layouts/spree/base_mailer.html.erb:13:in _5b39332459e0ece807e10eb9917a7918' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/template.rb:157:in block in render'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications.rb:168:in instrument' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/template.rb:352:in instrument_render_template'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/template.rb:155:in render' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/deface-1.3.0/lib/deface/action_view_extensions.rb:41:in render'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/template_renderer.rb:64:in render_with_layout' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/template_renderer.rb:50:in render_template'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/template_renderer.rb:14:in render' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/renderer.rb:42:in render_template'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/renderer/renderer.rb:23:in render' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/rendering.rb:103:in _render_template'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/rendering.rb:83:in render_to_body' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/abstract_controller/rendering.rb:24:in render'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:935:in block in collect_responses_from_templates' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:932:in each'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:932:in each' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:932:in map'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:932:in collect_responses_from_templates' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:917:in collect_responses'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:830:in mail' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/spree_core-3.4.4/app/mailers/spree/base_mailer.rb:19:in mail'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/spree_core-3.4.4/app/mailers/spree/order_mailer.rb:7:in confirm_email' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in process_action'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in block in process_action' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in run_callbacks'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in process_action' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in process'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/rescuable.rb:23:in block in process' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/rescuable.rb:15:in handle_exceptions'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/rescuable.rb:22:in process' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in process'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:609:in block in process' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in block in instrument'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in instrument' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in instrument'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/base.rb:608:in process' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/message_delivery.rb:105:in block in processed_mailer'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/message_delivery.rb:104:in tap' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/message_delivery.rb:104:in processed_mailer'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/message_delivery.rb:95:in deliver_now' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/actionmailer-5.1.4/lib/action_mailer/delivery_job.rb:14:in perform'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/execution.rb:37:in block in perform_now' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:108:in block in run_callbacks'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/i18n-0.9.5/lib/i18n.rb:268:in with_locale' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/translation.rb:7:in block (2 levels) in module:Translation'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in instance_exec' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in block in run_callbacks'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/logging.rb:24:in block (4 levels) in <module:Logging>' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in block in instrument'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in instrument' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in instrument'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/logging.rb:23:in block (3 levels) in <module:Logging>' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/logging.rb:44:in block in tag_logger'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69:in block in tagged' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:26:in tagged'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69:in tagged' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/logging.rb:44:in tag_logger'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/logging.rb:20:in block (2 levels) in <module:Logging>' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in instance_exec'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in block in run_callbacks' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in run_callbacks'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/execution.rb:33:in perform_now' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/execution.rb:22:in block in execute'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:108:in block in run_callbacks' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/railtie.rb:26:in block (4 levels) in class:Railtie'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/execution_wrapper.rb:85:in wrap' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/reloader.rb:68:in block in wrap'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/execution_wrapper.rb:85:in wrap' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/reloader.rb:67:in wrap'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/railtie.rb:25:in block (3 levels) in <class:Railtie>' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in instance_exec'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in block in run_callbacks' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in run_callbacks'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/execution.rb:20:in execute' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/activejob-5.1.4/lib/active_job/queue_adapters/async_adapter.rb:68:in perform'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in run_task' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in block (3 levels) in create_worker'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in loop' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in block (2 levels) in create_worker'
/Users/lakshya/.rvm/gems/ruby-2.4.2/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in catch' /Users/lakshya/.rvm/gems/ruby-2.4.2/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in block in create_worker'
Rendered public/vinsol_spree_themes/current/views/spree/shared/_head.html.erb

# Not able to send mail as user purchase something in spree 3.4.4

Route error after publishing theme

Installed spree_themes
gem 'vinsol_spree_themes', github: 'vinsol-spree-contrib/spree_themes', branch: 'master'


 'ruby-2.3.4'
 gem 'spree', '~> 3.4.0'
 gem 'spree_auth_devise', '~> 3.3'
 gem 'spree_gateway', '~> 3.3'

Getting route error after publishing either one
https://github.com/vinsol-spree-contrib/theme-BigShop/archive/3-3-bump.zip
https://github.com/vinsol-spree-contrib/theme-ClassicWhite/archive/3-3-bump.zip

ActionView::Template::Error (No route matches {:action=>"show", :controller=>"sp
ree/admin/themes_preview", :theme_id=>nil}, possible unmatched constraints: [:th
eme_id]):
    18:   <div class="alert alert-preview" role="alert">
    19:     <h4 class="text-center">
    20: <%= Spree.t('warnings.preview_mode_message') %>
    21:       <%= link_to 'X', admin_theme_preview_path(params[:theme]), method: :delete, class: 'pull-right' %>
    22:     </h4>
    23:   </div>
    24: <% end %>

app/views/spree/layouts/spree_application.html.erb:21:in `_62df21b47e640970cf406
a5536f93374'


Routes:

Helper HTTP Verb Path Controller#Action
spree_path   / Spree::Core::Engine
state_change_admin_theme_path PATCH /admin/themes/:id/state_change(.:format) spree/admin/themes#state_change
download_admin_theme_path PATCH /admin/themes/:id/download(.:format) spree/admin/themes#download
upload_admin_themes_path POST /admin/themes/upload(.:format) spree/admin/themes#upload
admin_theme_templates_path GET /admin/themes/:theme_id/templates(.:format) spree/admin/themes_templates#index
  POST /admin/themes/:theme_id/templates(.:format) spree/admin/themes_templates#create
new_admin_theme_template_path GET /admin/themes/:theme_id/templates/new(.:format) spree/admin/themes_templates#new
edit_admin_theme_template_path GET /admin/themes/:theme_id/templates/:id/edit(.:format) spree/admin/themes_templates#edit
admin_theme_template_path PATCH /admin/themes/:theme_id/templates/:id(.:format) spree/admin/themes_templates#update
  PUT /admin/themes/:theme_id/templates/:id(.:format) spree/admin/themes_templates#update
admin_theme_preview_path GET /admin/themes/:theme_id/preview(.:format) spree/admin/themes_preview#show
  DELETE /admin/themes/:theme_id/preview(.:format) spree/admin/themes_preview#destroy
admin_themes_path GET /admin/themes(.:format) spree/admin/themes#index
admin_theme_path DELETE /admin/themes/:id(.:format) spree/admin/themes#destroy

Google Analytics Partial Error

Good day

Please could someone point me in the right direction. I have the following error:

ActionView::MissingTemplate in Spree::Home#index
Showing /Users/username/Code Repos/appname/public/vinsol_spree_themes/theme-EStore-3-3-stable/views/spree/layouts/spree_application.html.erb where line #28 raised:

Missing partial spree/shared/_google_analytics with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :rabl, :jbuilder], :versions=>[:v1]}. Searched in:
  * "/Users/username/Code Repos/appname/public/vinsol_spree_themes/theme-EStore-3-3-stable/views"

I get this error for every theme I try to use. If comment out the following lines in /Users/username/Code Repos/appname/public/vinsol_spree_themes/theme-EStore-3-3-stable/views/spree/layouts/spree_application.html.erb they work:

<%= render partial: 'spree/shared/google_analytics.js' %>
<%= render partial: 'spree/shared/trackers/segment/initializer.js' %>

Any idea what's going wrong? I'm using Rails 5.2 and Spree 3.6. This is my Gemfile:

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.1'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby


gem 'spree', '~> 3.6'
gem 'spree_auth_devise', '~> 3.3'
gem 'spree_gateway', '~> 3.3'

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

group :test do
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '>= 2.15', '< 4.0'
  gem 'selenium-webdriver'
  # Easy installation and use of chromedriver to run system tests with Chrome
  gem 'chromedriver-helper'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'sprockets-helpers', '~> 1.2.1'
gem 'vinsol_spree_themes', github: 'vinsol-spree-contrib/spree_themes', branch: 'master'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.