Spagetti Car is a test Vanilla Install of Solidus
- Supporting Solidus
- Summary
- Demo
- Getting Started
- Installation Options
- Performance
- Developing Solidus
- Contributing
Solidus is a complete open source ecommerce solution built with Ruby on Rails. It is a fork of Spree.
See the Solidus class documentation and the Solidus Guides for information about the functionality that Solidus provides.
Solidus consists of several gems. When you require the solidus
gem in your
Gemfile
, Bundler will install all of the gems maintained in this repository:
solidus_api
(RESTful API)solidus_frontend
(Cart and storefront)solidus_backend
(Admin area)solidus_core
(Essential models, mailers, and classes)solidus_sample
(Sample data)
All of the gems are designed to work together to provide a fully functional
ecommerce platform. However, you may only want to use the
solidus_core
gem
combine it with your own custom frontend, admin interface, and API.
-
Clone the Git repo
git clone git://github.com/solidusio/solidus.git cd solidus
-
Install the gem dependencies
bin/setup
Note: If you're using PostgreSQL or MySQL, you'll need to install those gems through the DB environment variable.
# PostgreSQL export DB=postgresql bin/setup # MySQL export DB=mysql bin/setup
Solidus is meant to be run within the context of Rails application. You can easily create a sandbox application inside of your cloned source directory for testing purposes.
This sandbox includes solidus_auth_devise and generates with seed and sample data already loaded.
-
Create the sandbox application
bin/sandbox
You can create a sandbox with PostgreSQL or MySQL by setting the DB environment variable.
# PostgreSQL export DB=postgresql bin/sandbox # MySQL export DB=mysql bin/sandbox
If you need to create a Rails 5.2 application for your sandbox, for example if you are still using Ruby 2.4 which is not supported by Rails 6, you can use the
RAILS_VERSION
environment variable.export RAILS_VERSION='~> 5.2.0' bin/setup bin/sandbox
-
Start the server (
bin/rails
will forward any argument to the sandbox)bin/rails server
Solidus uses RSpec for tests. Refer to its documentation for more information about the testing library.
We use CircleCI to run the tests for Solidus as well as all incoming pull requests. All pull requests must pass to be merged.
You can see the build statuses at https://circleci.com/gh/solidusio/solidus.
ChromeDriver is required to run the frontend and backend test suites.
To execute all of the test specs, run the bin/build
script at the root of the Solidus project:
createuser --superuser --echo postgres # only the first time
bin/build
The bin/build
script runs using PostgreSQL by default, but it can be overridden by setting the DB environment variable to DB=sqlite
or DB=mysql
. For example:
env DB=mysql bin/build
If the command fails with MySQL related errors you can try creating a user with this command:
# Creates a user with the same name as the current user and no restrictions.
mysql --user="root" --execute="CREATE USER '$USER'@'localhost'; GRANT ALL PRIVILEGES ON * . * TO '$USER'@'localhost';"
Each gem contains its own series of tests. To run the tests for the core project:
cd core
bundle exec rspec
By default, rspec
runs the tests for SQLite 3. If you would like to run specs
against another database you may specify the database in the command:
env DB=postgresql bundle exec rspec
If you want to run the SimpleCov code coverage report:
COVERAGE=true bundle exec rspec
In addition to core functionality provided in Solidus, there are a number of ways to add features to your store that are not (or not yet) part of the core project.
A list can be found at extensions.solidus.io.
If you want to write an extension for Solidus, you can use the solidus_dev_support gem.