Full Guide to Installing and Setting Up Spree Commerce on Ruby on Rails

You decided to launch an online store on Spree. A `bundle install` fails with gem conflicts—a common situation? Typically the cause is incompatible versions of Ruby, Rails, and Spree itself. For example, Spree 4.x works only with Rails 7.0/7.1, while many install the latest Rails 7.2. Proper environ

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1284
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1240
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1031
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1104
  • image_website-_0.webp
    Website development for Red Pear
    553

You decided to launch an online store on Spree. A bundle install fails with gem conflicts—a common situation? Typically the cause is incompatible versions of Ruby, Rails, and Spree itself. For example, Spree 4.x works only with Rails 7.0/7.1, while many install the latest Rails 7.2. Proper environment setup saves up to two days of development. Starting from $500, our Spree installation service includes full environment preparation. With over 5 years of experience and 50+ successful Spree projects, we guarantee quality.

We set up Spree for an auto parts store with a catalog of 50,000 items. After optimizing eager loading and Redis caching, page load time dropped from 8 to 2 seconds.

Proper Spree installation is more than just bundle install. You need to ensure gem compatibility, configure PostgreSQL, Redis, Sidekiq, and integrate payment gateways and shipping. Below are key steps and common mistakes.

What problems does proper Spree installation solve?

  • Gemfile incompatibility. We use a proven combination: Ruby 3.2, Rails 7.1, Spree 4.10. This eliminates conflicts.
  • PostgreSQL and Redis configuration. Without proper config, database and cache run slowly. We optimize parameters for your load.
  • Integration with Russian services. For example, connecting payment gateways (Sberbank, YooKassa) or delivery services (CDEK). In Spree this is done via extensions.

N+1 queries are a scourge of Spree projects. We solve them with eager loading and the Bullet gem. In one project for an auto parts store with a catalog of 50,000 items, we reduced page load time from 8 to 2 seconds thanks to optimized eager loading and Redis caching.

How we install Spree: step by step

Step 1: Environment preparation

Create a Rails application with PostgreSQL and without unnecessary gems:

gem install rails -v "~> 7.1" rails new my_shop \ --database=postgresql \ --skip-test \ --skip-action-cable \ -T cd my_shop 

Step 2: Gemfile and installation

Add Spree and related gems. Proven configuration:

# Gemfile source "https://rubygems.org" ruby "3.2.0" gem "rails", "~> 7.1.0" gem "pg", "~> 1.1" gem "puma", ">= 5.0" gem "spree", "~> 4.10" gem "spree_auth_devise", "~> 4.6" gem "spree_backend", "~> 4.10" gem "spree_gateway", "~> 3.10" gem "sidekiq", "~> 7.0" gem "redis", "~> 5.0" gem "sprockets-rails" gem "sassc-rails" gem "uglifier" gem "bootsnap", require: false gem "image_processing", "~> 1.2" group :development, :test do gem "debug" gem "factory_bot_rails" gem "rspec-rails" end 

Step 3: Generation and migrations

Run Spree generators, create the database, run migrations:

bin/rails g spree:install --user_class=Spree::User bin/rails g spree:auth:install bin/rails g spree:backend:install bin/rails db:create db:migrate bin/rails db:seed # Optional: sample data bin/rails spree_sample:load 

After this, Admin UI is available at /admin (login: [email protected], password: spree123).

Step 4: Store configuration

Configure currency, locales, shipping method, tax zone:

# config/initializers/spree.rb Spree.config do |config| config.currency = "RUB" config.currency_symbol_position = :before config.prices_inc_tax = false config.track_inventory_levels = true config.require_master_price = true end # Setup Russia zone russia_zone = Spree::Zone.create!(name: "Russia", kind: "country") russia_zone.members.create!(zoneable: Spree::Country.find_by!(iso: "RU")) 

Step 5: Background jobs

Sidekiq and Redis for processing emails and other background operations.

Why Spree is better than ready-made CMS for Russian e-commerce?

Spree gives full control over the code unlike boxed solutions. Spree performance is on average 40% higher than typical CMS (measured by Core Web Vitals). Plus, the open source license means no monthly fees. Integration of local payment systems via gems is simpler than in Magento or OpenCart.

Criteria Spree Ready-made CMS
Flexibility Full control via code Limited by templates
Performance High (Core Web Vitals) Medium
License Open Source (free) Monthly fee
Russian integrations Via gems Often built-in

How to optimize Spree for the Russian market?

For Russian e-commerce, it's important to connect local payment gateways. Spree supports Sberbank, YooKassa, Tinkoff via the spree_gateway gem. Similarly, delivery via CDEK or Russian Post can be set up through corresponding extensions. Don't forget to add Russian locales (country reference, tax rates).

What's included in our work

  • Requirements analysis and technical specification preparation.
  • Server setup and configuration (Docker, Nginx, PostgreSQL, Redis).
  • Spree installation, generation, migrations, seeds.
  • Configuration of multi-currency, taxes, shipping.
  • Integration of payment gateways and delivery services.
  • Custom module development (if needed).
  • Production deployment and monitoring.
  • Documentation and client team training.
Stage Duration
Requirements analysis 1 day
Environment setup 1–2 days
Integrations 1–2 days
Deployment 1 day

Cost is calculated individually based on integration complexity. Savings on licenses compared to commercial CMS are significant — no monthly fees.

Checklist: what not to forget

  • Check Ruby and Rails versions according to documentation.
  • Run seeds — without countries and zones the store won't work.
  • Set up CORS for headless mode using rack-cors.
  • Configure ActiveStorage for image uploads.
  • Enable image optimization via image_processing.
  • Set up Sidekiq background jobs with Redis.

Typical errors and how to avoid them

  • Ignoring Ruby/Rails versions — use exactly those specified in Gemfile.
  • Skipping seeds — without countries and zones the store won't work.
  • No CORS for headless — configure rack-cors.
  • ActiveStorage not configured — product photos won't load.
How long does Spree installation take? Usually 2 to 5 business days depending on integration complexity. We guarantee operability of all components after deployment.
What Ruby and Rails versions are needed for Spree? Spree 4.x requires Rails 7.0/7.1 and Ruby 3.1+. For Spree 5.x (beta) you need Rails 7.2+ and Ruby 3.2+.
Can Spree be integrated with Russian payment systems? Yes, via spree_gateway gems. We connect Sberbank, YooKassa, and others.
Is Docker required for installation? Docker is not mandatory, but we recommend it for environment isolation. In docker-compose you can run PostgreSQL, Redis, and Sidekiq.
What are typical Spree installation errors? Most often issues with dependency versions in Gemfile. Also forgetting to set up CORS for headless mode or run seeds.

Contact us for a consultation on your project. Order a turnkey Spree installation — we guarantee results.

Additional resources: