One of the most known Ruby on Rails e-commerce apps is Shopify. It has been in the market since 2006 and given a home to over 800K online stores. Isn’t that proof that the framework is a great choice for an e-commerce project nowadays? Find it out.
Why startup founders and entrepreneurs opt for Ruby on Rails?
Basically, the framework attracts those who want to use Ruby for a website project. It allows the stakeholders to test and validate their ideas much faster than other tech stacks. Here are some of the best reasons to use Ruby on Rails.
Rails is a cost-saving technology. First of all, it is a free framework for both individuals and companies. It is also compatible with numerous databases and free web servers. Second, time expenses are lower by one-third and more compared to conventional web development tools. As a result, you get an increased cost-efficiency and ROI of your project be it a regular website, project management system or e-commerce with Ruby on Rails.
Startups choose RoR because they need a tech stack that would let them do their best in the context of constrained schedule. Rails is well suited to rapid web development, and that’s what entrepreneurs appreciate most. Its convention over configuration paradigm excludes any unnecessary delays for configuration. Besides, it means that all Rails on Rails apps have a similar structure that is rather helpful to onboard new engineers on the project seamlessly. RoR practices including the MVC and DRY reduce time expenses and increase engineers’ efficiency. With the framework, you need a small team to build an MVP followed by beta version fast enough. Most alternative solutions including .NET or Java Spring cannot do this.
Rails ecosystem which consists of gems, corresponds to that of Java. So far, the number of gems (software packages containing a library or add-on) has exceeded 150K and continues to grow. They are ready-to-use solutions for common functionalities like user management or social feeds. The major benefit is time-saving. It’s likely that somebody has already solved your problem and made a corresponding gem available. This aspect is viable in terms of limited time/budget and contributes to rapid development and fast prototyping.
What is important to consider when choosing a tech stack for an e-commerce project?
An e-commerce app allows its users to buy and sell wares or services online using a PC, laptop, tablet or smartphone. Sale-purchase operations involve confidential data like email, shipping address, payment details, bank card number, and so on. With that in mind, data security must be the top-priority criteria.
Being a reliable app means avoiding or at least minimize possible crashes and instability cases. Users do not like unreliable products and probably drop off if the user experience is poorly-balanced. Your e-commerce app should be thoroughly tested prior to release, but also get regular updates and keep evolving.
One of the main advantages of Ruby on Rails e-commerce development is high scalability. This criterion is critical if your app needs to cope with tons of requests sent by multiple users. Perhaps, it is not extremely important at the outset. However, the growth of the app’s popularity will mean increased traffic and the necessity to handle it.
Design includes a UI compatible with different devices, as well as operating systems if you’re building a mobile e-commerce app. Apart from being sticky and attractive, your product should be intuitive in use to acquire even the most exacting user.
Building a Ruby on Rails e-commerce website
Speaking about how good RoR is for building online stores without hands-on cases is empty talk. So, let’s take a look at how you can use certain gems or Rails platforms for specific pieces of functionality.
The framework offers solutions to optimize the accounting flow and avoid manual processing. Here are some Ruby gems to help you deal with different accounting and financial activities:
- Integration of your accounting software:
- Double entry bookkeeping: double_entry, plutus
- Currency conversion: goog_currency
- Invoicing: spree_print_invoice, stripe_invoice, invoice_bar, invoice_printer
- Various financial analysis functions: cash_flow_analysis
- Sales processing: sales_and_orders_decorator
- Complex business management solution covering invoice generation, graphical sales reporting, and Stripe payment engine: office_clerk
Gems for customer relationship management allow you to integrate your app with specific CRM solutions, import/export customer lists, segment customers, gather relevant data, and many other functionalities.
- Integration of your CRM software:
- CRM functions together with ticketing and order management: artfully_ose
- Customer relationship management platform: fat_free_crm
If you’re building a Ruby on Rails e-commerce site, you will make use of the gems designed to manage your product lines including stock tracking, assortment examination, products categorization, etc.
- Inventory management plus point-of-sale, online presence and other business management tools: office_clerk
- Control the flow of products and orders through invoices: inventory-cli
- Stock tracking: stocker
E-commerce marketing is important as for not only sales growth but also brand awareness. Rails offers many gems to get this job done.
- Email marketing automation via integration with external solutions:
- Email marketing management including email campaigns, daily notifications, and so on: maily_herald
- Search engine optimization:
- Integration with social networks:
- Referral programs and sending product recommendations: talkable-ruby, spree_email_to_friend
- Advertising platforms integration:
Rubyists have not neglected the checkout process as well and have prepared several useful gems.
- Simple shopping cart for Rails: carter
- Checkout functionality for integration with your app: acts_as_shopping_cart
- A complex tool covering the shopping carts building, automatic email receipts, and payment collection via most popular systems including Stripe/Stripe Connect, PayPal and Moneris: effective_orders
- A collection of e-commerce tools (checkout logic, content scheduling and release management, e-commerce content delivery): market_town
This component of your future Ruby on Rails e-commerce app is also well covered by multiple payment-related gems.
- Credit card validation: credit_card_validations
- PayPal API: PayPal-Ruby-SDK
- Stripe API using which you can already build a good e-commerce prototype: stripe-ruby
- Miscellaneous payment gateways: spree_gateway, solidus_gateway, rack-lightning
Versatile analytical and reporting tools:
- Management of different analytics services including Google Analytics, Clicky, Hubspot, and others: analytical
- Powerful analytics solution: ahoy_matey-1.6.0
- Google Analytics tracking: google-analytics-rails
Fraud protection is a vital element to consider when creating e-commerce products Ruby on Rails.The Rubyist community offers a plethora of security gems:
- Security vulnerability detection via static analysis: brakeman
- Patch-level verification for bundled apps: bundler-audit
- Security source code scanner: dawnscanner
- Client payment details protection: saferpay-gem
- Rates and tracking info from numerous shipping carriers including FedEx, USPS, Shipwire, and others: active_shipping, shippo-ruby-client
- Shipping prices via UPS or FedEx: shipping
- Interaction with carriers: fedex, ups, usps
- Shipping cost calculator: spree_weigth_calculator
Automatic tax calculation is an essential part of any dignified online store so far. RoR has several solutions to assist in this regard
- Income tax calculator: income-tax
- Integration with TaxCloud: tax_cloud
- Sales taxes calculation: panier
E-commerce frameworks for Ruby on Rails
The gems above provide specific features or functionality. However, RoR also offers several fully stocked solutions to build an online store, so your pipeline can be significantly boosted. They are known as e-commerce frameworks.
This open source Ruby on Rails e-commerce framework originates from the RailsCart project launched in 2007. A year later, it changed the code hosting service (from Google Code to GitHub) and got the name of Spree with the first release of 0.0.9 version. In 2009, the framework found its web place on spreecommerce.org
It is a scalable and rich-in-functionality solution. With Spree, you can build large e-commerce apps like GoDaddy, Garmentory, Huckberry and so on. It is an out of the box gem, which has numerous extensions and third-party integrations to improve the functionality of your online store. The framework offers a bunch of miscellaneous features related to customer facing, omnichannel and international sales capabilities, marketing, back office, and compliance. Integration support is also huge. You can link your app to a plethora of tools for analytics, fulfillment, search, marketing, payment, shipping, and taxes.
Number of downloads: more than 900K
We cannot call Solidus a completely genuine e-commerce solution since it was forked from Spree 2.4 in 2015. When the Spree team terminated investments, Canadian contributors from Stembolt (now a part of JUUL Labs) and Bonobos committed to creating a new project and founded Solidus.
Just like its parent framework, Solidus is open source. It focuses on complex storefronts and high-volume businesses. For the most part, this gem has many similarities with Spree, but is known for the following high-level distinctions:
- Production-ready stable code
- Easier upgrading
- Better integrations with third-party apps
Solidus provides essential e-commerce features including payment integrations, product management, tax calculations, analytics and so on. You can fine-tune them for your specific needs. Among others, Glossier, Floyd, and Wonderbly are successful Solidus use cases.
Number of downloads: more than 230K
Spree and Solidus are flagship RoR e-commerce gems. However, there are others you should know about:
- nimbleshop – a free e-commerce framework with over 39K downloads
- ecommerce – a simple framework providing such features as products table, cart, and PayPal checkout. Number of downloads is above 12K
- stall – a simple and modular framework with over 5K downloads
Bonus: ror_ecommerce is not a gem yet. It is a promising startup project for small businesses, which already has a Ruby on Rails e-commerce example – Trumaker. The framework includes such features as purchase orders administration, product management, shipments, fulfillment, shopping cart, double entry accounting system, and minimal customer facing.
Top e-commerce CMS for Ruby on Rails
A content management system or CMS is a time-saving solution, which you can integrate into your e-commerce app. PHP underlies most famous CMSs like WordPress or Joomla. However, Ruby also has some robust and ready-to-scale systems to manage your content.
It is the most starred Ruby on Rails e-commerce CMS according to GitHub rating (3.6K). Refinery is a simple and easy to use multilingual solution with clean UI and flexible design. The system has numerous extensions like Blog, Dynamic Fields, Copywriting, Elasticsearch, and others to customize your content flow. Refinery supports Heroku and AWS for hosting and deployment.
CMS stands for not only Content Management System, but also Comfortable Mexican Sofa. This word-play does make you smile. However, people mostly call this solution Comfy. It’s known for supporting early Rails versions and powerful templating capabilities. The best way to take advantage of the CMS is to implement it away from the rest of your e-commerce app. Comfy’s key features include the built-in text code editors, the capability to manage multiple sites on the same CMS, and multi-language support (18 languages).
This content management system is considered a WordPress equivalent for Rubyists. Camaleon focuses on dealing with content instead of programming and can be adapted to almost any project. The system allows you to create a custom architecture for all content types. Integration of numerous plugins like MailChimp, Mandrill, E-Commerce, Contact Form is a way to extend functionality. And multiple ready-made themes are meant to manage your content visualization.
Rails version support: 4.2 or 5.0+
Total downloads: 73K+
E-commerce companies using RoR
Shopify is a common answer to the question “What e-commerce platform runs on Ruby Rails?” This company was a pioneer of RoR use in this field and proved the framework’s viability. At the outset, it was a simple online snowboard store in Canada with the fitting name Snowdevil. After the founders decided to shift the focus from retailing to e-commerce, the platform was renamed Jaded Pixel. There is a lack of information about how the name of Shopify emerged, but Bloomberg claims that it happened in 2011. Today, this platform offers multiple options for launching an online store or retail point-of-sale system for small-to-medium businesses.
Instacart is the name of an RoR-based grocery delivery app. This service allows you to purchase grocery stores and get them delivered to your location right on the day of purchase or up to six days later. So far, Instacart covers several locations in Canada and the US. Customers can find thousands of products from the stores they already shop at and get suggestions on amazing new items. In addition to the main activity, the Instacart team shares its engineering experience via the blog on Medium.
“It’s rare that a company comes along and reinvents the wheel, but it looks like that is about to happen”. That’s how The New York Times described this company. Superpedestrian lets its customers turn their man-powered bikes into electric-driven ones. So, their team needed something more than a regular online store. Spree helped them create a website with an excellent UX. Now, users can enjoy clear design, product customization, integrated live chat with customer service, upselling and other features.
Meet another Spree-based online shop of fresh and healthy food. Farmdrop is a marketplace, where farmers can sell their products including fruit, fish, dairy, bakery, meat and so on. Buyers, in turn, need to place an order and get their order delivered within 19 hours. The only drawback of this app is that the delivery covers Central London only. However, the range is expanding. The guys from Farmdrop have no regret of choosing Rails+Spree and say it is the perfect technology for their Fix The Food Chain mission.
The last app on our list is a Solidus use case. It is an online furniture shop where you can buy thoughtful products that, as they claim, you won’t throw away. These include sofas, beds, tables, and versatile hardware. An interesting thing about Floyd is that they made a list of their absolute favorite Airbnb’s and furnished them with their products. The idea is that you can stay Floyd even when traveling.
Is there anything else I should know before going with RoR for e-commerce?
The Ruby language was designed with the goal of increasing developer happiness. Rails inherited this hallmark as well. Without evasion, engineers that enjoy what they do are likely to be more productive. That, in turn, means better outcomes for your startup or product.
From a hiring perspective, a regular Rubyist is a person interested in skills development and a perfect match for a small team. Besides, Rails-savvy engineers are often good at full-stack development practices that are vital for making scalable Ruby on Rails websites.
RoR is agile, scalable, known for its eloquent and concise code and a tremendous number of plugins or libraries to facilitate the pipeline. So, the answer to “Is Ruby on Rails good for e-commerce?” is clear. If you are hugely interested in RoR and need more understanding of its benefits, tell us about your project here, and our engineers will give you a top-level consultancy.