https://solidus.io logo
Join Slack
Powered by
# support
  • m

    M C

    09/19/2022, 4:03 PM
    Is this a known issue? Any ideas?
  • m

    M C

    09/19/2022, 4:04 PM
    Any help would be very appreciated. Thank you.
  • e

    elia

    09/19/2022, 4:04 PM
    @M C you have
    mount Spree::Core::Engine, at: '/'
    defined twice, probably a bad combo with the installer and the latest frontend template
  • e

    elia

    09/19/2022, 4:05 PM
    Removing
    Copy code
    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: '/'
      # 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 it
    🙌 1
  • m

    M C

    09/19/2022, 4:05 PM
    oof
  • m

    M C

    09/19/2022, 4:05 PM
    how did I miss that…
  • m

    M C

    09/19/2022, 4:06 PM
    just as an FYI to anyone else reading this, that was the default install routes.rb
  • m

    M C

    09/19/2022, 4:06 PM
    thanks @elia! Everything is working now!
    🎉 1
  • e

    elia

    09/19/2022, 4:06 PM
    I had the same issue just a couple hours ago, it’s hard to spot
  • m

    M C

    09/19/2022, 4:06 PM
    haha, got it
  • m

    M C

    09/19/2022, 4:07 PM
    huge help, thanks again!
    e
    • 2
    • 1
  • j

    Jay

    09/19/2022, 4:19 PM
    Hello guys , which are some of the S3 storage providers you use? Also except digital Ocean and Heroku. Which are some of the hosting services you use to host your rails apps/solidus stores.
    w
    • 2
    • 3
  • s

    Sabo

    09/19/2022, 6:44 PM
    Hello I have some issue with
    solidus_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]
    w
    • 2
    • 1
  • s

    Sabo

    09/19/2022, 6:45 PM
    https://github.com/solidusio/solidus_stripe/issues/131
  • j

    Jason

    09/19/2022, 10:05 PM
    Hello all, I'm kinda new to solidus and I'm looking for a way to make it so that accessing the storefront requires a login before seeing products not just prior to checkout. Is there a config that I have not found yet or guide that would help point me in the right direction?
    c
    w
    • 3
    • 6
  • s

    Sabo

    09/21/2022, 8:42 AM
    Hello, I'm trying to use the
    solidus_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 link
    w
    e
    • 3
    • 6
  • c

    Chris Wilson

    09/21/2022, 11:29 PM
    Hello I am getting an error on installing slack I am getting the error "*Invalid route name, already in use: 'spree' (ArgumentError)" , Rails says this You may have defined two routes with the same name using the
    :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:*
    ✅ 1
  • c

    Chris Wilson

    09/21/2022, 11:29 PM
    Copy code
    My 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
  • c

    Chris Wilson

    09/21/2022, 11:54 PM
    I fixed my own issue it turns out that mount Spree:Core:Engine, at: '/' is defined twice and I have two Rails.application.routes.draw do blocks, I did this on a fresh solidus install on rails Rails 7.0.4, I fixed the issue by commenting out the duplicate routes in my config.rb
    sg horns 1
    e
    • 2
    • 1
  • s

    Sabo

    09/22/2022, 8:59 AM
    Hello, I have a little question, I'm looking where (like fr.devise.xxxx) I can change a french translation of solidus_auth_devise for the flash notice when you need to confirm your email
  • s

    Sabo

    09/22/2022, 9:01 AM
    "Vous devez confirmer votre compte avant de continuer" is not very explicit I would change for something like "Vous devez confirmer votre email pour vous connecter"
    w
    • 2
    • 3
  • j

    Jay

    09/22/2022, 5:39 PM
    hello guys ,tried looking for thar file on the solidus github containg that css code, kindly help. Getting this error while deploying. Thanks in advance.
    Copy code
    rake 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 advance
    w
    • 2
    • 11
  • w

    Wladjmir

    09/22/2022, 6:11 PM
    Hi all, could i ask if run test suite (
    bundle 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? Thanks
    w
    • 2
    • 8
  • c

    Chris Wilson

    09/23/2022, 2:29 AM
    In a fresh solidus install It is not making a default user of admin@example.com with a password of test123. , and I cannot login to the admin, although I found this hack
    Copy code
    user.spree_roles << Spree::Role.find_or_create_by(name: 'admin')
    w
    e
    • 3
    • 32
  • s

    Sabo

    09/23/2022, 9:12 AM
    Hello, I know we can find the weigth of a package with
    Spree::Stock::Package.weight
    but how can we find the package associated from an order ?
  • s

    Sabo

    09/23/2022, 9:13 AM
    I would prevent ordering from a certain weight per order
    k
    • 2
    • 3
  • s

    Sabo

    09/23/2022, 1:41 PM
    I created a custom
    ShippingCalculator
    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
    Copy code
    Rails.application.config.spree.calculators.shipping_methods << Shop::Calculator::Shipping::CustomCalculator
    I get :
    Copy code
    uninitialized constant Shop::Calculator (NameError)
    Rails.application.config.spree.calculators.shipping_methods << Shop::Calculator::Shipping::CustomCalculator
    k
    w
    • 3
    • 14
  • j

    Jay

    09/23/2022, 6:39 PM
    Hello guys, i have a non-solidus related issue . I'm getting the following error on my the nginx logs trying to launch a solidus store. Any pointers would be greatly appreciated. Note: I have added
    Copy code
    gem 'stringio', '~> 3.0', '>= 3.0.2'
    and still nothing. The error is as below.
    Copy code
    [ 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.
    t
    • 2
    • 6
  • s

    Sabo

    09/24/2022, 7:54 AM
    Hello I do some tests with
    solidus_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
    w
    • 2
    • 2
  • j

    Jay

    09/25/2022, 6:50 AM
    Hello guys, the images in my solidus store take too long to load. Is there an efficient method i can use to make them load faster ? Thank you in advance.
1...232425...39Latest