spree

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

不羁的心 提交于 2019-12-28 06:52:31
问题 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

Every time I deploy with Capistrano two images are removed from my page

主宰稳场 提交于 2019-12-25 10:57:21
问题 I have a Spree Webshop Ruby on Rails application. Every time I run cap deploy and I look at my page, two of the three product images that are displayed on the mainpage are gone. The two images still display at the admin page as an alternative text (so not the actual image). When I click it I get the following message: No route matches [GET] "/spree/products/7/product/imagename.png" Rails.root: /rails/releases/20140127203640 There is no difference between how I handled the images, I all added

I would like to add new javascript file to my spree extension

眉间皱痕 提交于 2019-12-25 05:36:07
问题 I am new in rails. I'm trying to build Spree extension to use Braintree's drop-in UI. I'm trying to add new braintree.js to my extension. These are the steps I did so far. Added braintree.js to <my_extension>/app/assets/javascripts/spree/frontend/ Added //= require spree/frontend/braintree to app/assets/javascripts/spree/frontend/<my_extension>.js . Created braintree.rb in <my_extension>/config/initializers/ . Content of this file: Braintree::Configuration.environment = :sandbox Braintree:

Spree::OrderPopulator.populate ordering two items when one requested

♀尐吖头ヾ 提交于 2019-12-25 02:21:06
问题 I have a program where I am attempting to programatically create Spree orders. I am using the OrderPopulator class to complete this. My code is: populator = Spree::OrderPopulator.new current_order(create_order_if_necessary: true), current_currency products.each do |product| variant = Spree::Variant.find_by product_id: product.id, is_master: true puts "Pre-Items: #{current_order.line_items.count}" populator.populate({ products: { product_id: product.id, variant_id: variant.id }, quantity: 1 })

Cannot install state_machines gem in Windows environment

两盒软妹~` 提交于 2019-12-24 22:26:40
问题 I am new to Rails and would like to check how Spree ecommerce solution looks like before the customization. That's why I installed Ruby from RubyInstaller, DevKit, Rails, Spree etc. During installation of state_machines gem, below error appears and the gem is eventually not installed. C:\>gem install state_machines ERROR: While executing gem ... (Errno::EINVAL) Invalid argument @ rb_sysopen - C:/Dev/Ruby/lib/ruby/gems/2.1.0/gems/state_m achines- 0.2.2/test/unit/node_collection/node_collection

Is there a scope to allow me to show only products with variants with stock?

孤者浪人 提交于 2019-12-24 15:33:20
问题 I'd like to change the "products" overview of my Spree 3.0.x shop to show only products that have one or more variants that can be supplied. This would be on top of the normal scopes (available, with price in current currency). It would also affect the taxonomy-listings. I don't want to affect the search page, though: when searching, unavailable products should show up. As far as I can see, there is no such scope, neither on Spree:Product nor on Spree::Product scopes.rb . If there is no such

Spree generic implementation for api token

馋奶兔 提交于 2019-12-24 11:26:49
问题 I an deleting items from spree cart using the following spree api url /api/orders/#{current_order.number}/line_items/#{line_iem.id}?line_item[variant_id]=#{line_item.variant.id}&line_item[quantity]=0&token=MyToken the token used here is of a single user. I want to implement this in generic way so that it can be used for both guest and registered user.. is it possible? any help would be highly appreciated Regards 回答1: Whenever you create an order using the Spree API, you get an order_token in

Spree redirect after login

梦想的初衷 提交于 2019-12-24 03:16:13
问题 Spree 2.3 with spree_auth_devise, Rails 4.0 I am trying to redirect users after sign in based on their role. The best solution would be to modify a path, a la Devise, in an initializer, but these don't seem to exist for Spree. The next best solution would be to create a decorator on the sessions controller, but I can't find this controller, nor can I access it when I attempt to follow the information from rake routes How can I redirect users to a new location after login, in a Spree app,

Rails - problem installing Spree

拥有回忆 提交于 2019-12-24 01:44:27
问题 I'm having a problem installing Spree in a Rails app. when I run gem 'spree' (as per the instructions on http://spreecommerce.com/documentation/getting_started.html) I get the following error: ERROR: While executing gem ... (RuntimeError) Unknown command spree I have the following Spree gems installed: gem list spree *** LOCAL GEMS *** spree (0.30.1) spree_api (0.30.1) spree_auth (0.30.1) spree_core (0.30.1) spree_dash (0.30.1) spree_promo (0.30.1) spree_sample (0.30.1) when I installed the

Spree: Turning off SSL redirects /admin back to site

半城伤御伤魂 提交于 2019-12-24 00:59:35
问题 I've setup a fresh rails app, installed the spree gem (1.1.2) and was able to successfully get Spree up and running however I don't have an SSL certificate and am just looking to mess around with Spree before I purchase a cert, etc. I can successfully show the spree page that would show products, etc., but when I go to /admin it redirects back to the home page of the site. This is what the log shows: Started GET "/admin" for 76.122.36.219 at Wed Jul 18 15:25:42 -0500 2012 Processing by Spree: