spree

How to add new view to Ruby on Rails Spree commerce app?

流过昼夜 提交于 2019-11-29 14:48:11
问题 A very basic question that I cannot seem to solve is how to add a new view to my Ruby on Rails Spree commerce application. What I want to do is have a link next to the Home link in the _main_nav_bar.html.erb and when you click it have displayed an about page at the place where the products are displayed. So: home about cart --------------------- things of the HOME page --------------------- footer Click on about leads to: home about cart --------------------- things of the ABOUT page --------

How to find current abstract route in Rails middware

倾然丶 夕夏残阳落幕 提交于 2019-11-29 10:01:40
Rails version: '~> 4.2.7.1' Spree version: '3.1.1' TlDr: How do I get route as /api/products/:id or controller and action of that route in a middleware of Rails 4 application. Details: I am adding a middleware in my rails app which is similar to gem scout_statsd_rack . This adds following middleware to rails app to send metrics via statsd: def call(env) (status, headers, body), response_time = call_with_timing(env) statsd.timing("#{env['REQUEST_PATH']}.response", response_time) statsd.increment("#{env['REQUEST_PATH']}.response_codes.#{status.to_s.gsub(/\d{2}$/,'xx')}") # Rack response [status,

How to find current abstract route in Rails middware

佐手、 提交于 2019-11-28 03:28:34
问题 Rails version: '~> 4.2.7.1' Spree version: '3.1.1' TlDr: How do I get route as /api/products/:id or controller and action of that route in a middleware of Rails 4 application. Details: I am adding a middleware in my rails app which is similar to gem scout_statsd_rack. This adds following middleware to rails app to send metrics via statsd: def call(env) (status, headers, body), response_time = call_with_timing(env) statsd.timing("#{env['REQUEST_PATH']}.response", response_time) statsd

Paperclip::NotIdentifiedByImageMagickError in Spree::Admin::ImagesController#create

不羁岁月 提交于 2019-11-28 01:32:24
I am attempting to setup Spree for the first time. Everything was going well until I hit the image upload. I have installed Imageamgick using homebrew on Mac OSX Mountain Lion. Uploading any image gives me the following error. Paperclip::NotIdentifiedByImageMagickError in Spree::Admin::ImagesController#create Command :: identify -format %wx%h :file [paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /var/folders/fq/9g_6hmg513g6137rb6sbghw00000gn/T/stream20121005-26943-16883d4.png is not recognized by the 'identify' command.> Paperclip: