M C
09/19/2022, 4:03 PMM C
09/19/2022, 4:04 PMelia
09/19/2022, 4:04 PMmount Spree::Core::Engine, at: '/'
defined twice, probably a bad combo with the installer and the latest frontend templateelia
09/19/2022, 4:05 PMRails.application.routes.draw do
# This line mounts Solidus's routes at the root of your application.
# This means, any requests to URLs such as /products, will go to Spree::ProductsController.
# If you would like to change where this engine is mounted, simply change the :at option to something different.
#
# We ask that you don't use the :as option here, as Solidus relies on it being the default of "spree"
mount Spree::Core::Engine, at: '/'
# For details on the DSL available within this file, see <https://guides.rubyonrails.org/routing.html>
end
at the end of your file should be enough to fix itM C
09/19/2022, 4:05 PMM C
09/19/2022, 4:05 PMM C
09/19/2022, 4:06 PMM C
09/19/2022, 4:06 PMelia
09/19/2022, 4:06 PMM C
09/19/2022, 4:06 PMM C
09/19/2022, 4:07 PMJay
09/19/2022, 4:19 PMSabo
09/19/2022, 6:44 PMsolidus_stripe
(4.3.0) when I try to make a payment (with credit card) I get this error from the Stripe API A token may not be passed in as a PaymentMethod. Instead, create a PaymentMethod or convert your token to a PaymentMethod by setting the card[token]
Sabo
09/19/2022, 6:45 PMJason
09/19/2022, 10:05 PMSabo
09/21/2022, 8:42 AMsolidus_auth_devise
confirmable module, I want to force the user to confirm before logging in, I follow this instructions # ==> Configuration for :confirmable # The time you want to give your user to confirm his account. During this time # he will be able to access your application without confirming. Default is nil. # When confirm_within is zero, the user won't be able to sign in without confirming. # You can use this to let your user access some features of your application # without confirming the account, but blocking it after a certain period # (ie 2 days). # config.confirm_within = 2.days
so I settled on config.confirm_with
on 0.days
but I get this error Courriel translation missing: fr.activerecord.errors.models.spree/user.attributes.email.confirmation_period_expired
when I click on the confirmation linkChris Wilson
09/21/2022, 11:29 PM:as
option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with resources
as explained here:*Chris Wilson
09/21/2022, 11:29 PMMy routes.rb file looks like this # frozen_string_literal: true
Rails.application.routes.draw do
# This line mounts Solidus's routes at the root of your application.
# This means, any requests to URLs such as /products, will go to Spree::ProductsController.
# If you would like to change where this engine is mounted, simply change the :at option to something different.
#
# We ask that you don't use the :as option here, as Solidus relies on it being the default of "spree"
mount Spree::Core::Engine, at: '/'
root to: 'home#index'
devise_for(:user, {
class_name: 'Spree::User',
singular: :spree_user,
controllers: {
sessions: 'user_sessions',
registrations: 'user_registrations',
passwords: 'user_passwords',
confirmations: 'user_confirmations'
},
skip: [:unlocks, :omniauth_callbacks],
path_names: { sign_out: 'logout' }
})
resources :users, only: [:edit, :update]
devise_scope :spree_user do
get '/login', to: 'user_sessions#new', as: :login
post '/login', to: 'user_sessions#create', as: :create_new_session
match '/logout', to: 'user_sessions#destroy', as: :logout, via: Devise.sign_out_via
get '/signup', to: 'user_registrations#new', as: :signup
post '/signup', to: 'user_registrations#create', as: :registration
get '/password/recover', to: 'user_passwords#new', as: :recover_password
post '/password/recover', to: 'user_passwords#create', as: :reset_password
get '/password/change', to: 'user_passwords#edit', as: :edit_password
put '/password/change', to: 'user_passwords#update', as: :update_password
get '/confirm', to: 'user_confirmations#show', as: :confirmation if Spree::Auth::Config[:confirmable]
end
resource :account, controller: 'users'
resources :products, only: [:index, :show]
resources :order_contents, only: :create
get '/locale/set', to: 'locale#set'
post '/locale/set', to: 'locale#set', as: :select_locale
# non-restful checkout stuff
get '/checkout/registration', to: 'checkout#registration', as: :checkout_registration
put '/checkout/registration', to: 'checkout#update_registration', as: :update_checkout_registration
patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
get '/checkout', to: 'checkout#edit', as: :checkout
get '/orders/:id/token/:token' => 'orders#show', as: :token_order
resources :orders, except: [:index, :new, :create, :destroy] do
resources :coupon_codes, only: :create
end
get '/cart', to: 'orders#edit', as: :cart
patch '/cart', to: 'orders#update', as: :update_cart
put '/cart/empty', to: 'orders#empty', as: :empty_cart
# route globbing for pretty nested taxon and product paths
get '/t/*id', to: 'taxons#show', as: :nested_taxons
get '/unauthorized', to: 'home#unauthorized', as: :unauthorized
get '/cart_link', to: 'store#cart_link', as: :cart_link
end
Rails.application.routes.draw do
# This line mounts Solidus's routes at the root of your application.
# This means, any requests to URLs such as /products, will go to Spree::ProductsController.
# If you would like to change where this engine is mounted, simply change the :at option to something different.
#
# We ask that you don't use the :as option here, as Solidus relies on it being the default of "spree"
mount Spree::Core::Engine, at: '/'
# Define your application routes per the DSL in <https://guides.rubyonrails.org/routing.html>
# Defines the root path route ("/")
# root "articles#index"
end
Chris Wilson
09/21/2022, 11:54 PMSabo
09/22/2022, 8:59 AMSabo
09/22/2022, 9:01 AMJay
09/22/2022, 5:39 PMrake stdout: Nothing written
rake stderr: autoprefixer: /home/deploy/BizDigital/releases/20220922163654/vendor/assets/stylesheets/spree/backend/all.css:1625:368: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
rake aborted!
SassC::SyntaxError: Error: Function rgb is missing argument $green.
on line 14722 of stdin
>> box-shadow: 0 15px 40px -5px rgb(0 0 0 / 26%);
thanks in advanceWladjmir
09/22/2022, 6:11 PMbundle exec rspec
) is supposed to work out of the box, after a solidus with starter frontend installation?
i made quite a lot of changes, also on order state machine, trying to understand logic of application, now i would start testing but almost all included test failed, i checked the edge guide but i’m a bit confused.
moreover maybe also mounting point of engine (mine is on a subdomain) should be configured on test?
ThanksChris Wilson
09/23/2022, 2:29 AMuser.spree_roles << Spree::Role.find_or_create_by(name: 'admin')
Sabo
09/23/2022, 9:12 AMSpree::Stock::Package.weight
but how can we find the package associated from an order ?Sabo
09/23/2022, 9:13 AMSabo
09/23/2022, 1:41 PMShippingCalculator
following the instructions in https://guides.solidus.io/developers/shipments/custom-shipping-calculators
The custom ShippingCalculator (seems) work correctly in the rails console Shop::Calculator::Shipping::CustomCalculator
but when I try to register it in intializers/spree.rb
by
Rails.application.config.spree.calculators.shipping_methods << Shop::Calculator::Shipping::CustomCalculator
I get :
uninitialized constant Shop::Calculator (NameError)
Rails.application.config.spree.calculators.shipping_methods << Shop::Calculator::Shipping::CustomCalculator
Jay
09/23/2022, 6:39 PMgem 'stringio', '~> 3.0', '>= 3.0.2'
and still nothing. The error is as below.
[ E 2022-09-23 18:36:08.4569 20124/T34 age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /home/deploy/BizDigital/current: The application encountered the following error: You have already activated stringio 0.1.0, but your Gemfile requires stringio 3.0.2. Since stringio is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports stringio as a default gem. (Gem::LoadError)
Error ID: e672af7b
Error details saved to: /tmp/passenger-error-YOCeFs.html
Thanks in advance.Sabo
09/24/2022, 7:54 AMsolidus_auth_devise
(2.5.4) when I delete a user (from admin panel) and I try to register a new user with the same email I get the error "Email is already in use" whereas the user no longer exists in Spree::User
Jay
09/25/2022, 6:50 AM