Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🛒Solidus, Rails eCommerce System

License

NotificationsYou must be signed in to change notification settings

neroblack4life/solidus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solidus logo

Solidus

Circle CIGemLicenseReviewed by Hound

Supporters on Open CollectiveBronze Partners on Open CollectiveSilver Partners on Open CollectiveGold Partners on Open CollectiveOpen Source HelpersSlack

A free, open-source ecommerce platform that gives you complete control over your store.

Table of Contents

Supporting Solidus

As a community-driven project, Solidus relies on funds and time donated by developers and stakeholders who use Solidus for their businesses. If you'd like to help Solidus keep growing, please consider:

Main Contributor & Director

At present, Nebulab is the main code contributor and director of Solidus, providing technical guidance and coordinating community efforts and activities.

Nebulab

Ambassadors

Support this project by becoming a Solidus Ambassador. Your logo will show up here with a link to your website.Become an Ambassador.

Super Good SoftwareKarma CreativeModdedEuros


Summary

Solidus is a complete open source ecommerce solution built with Ruby on Rails.It is a fork ofSpree.

See theSolidus class documentation and theSolidusGuides for information about the functionality thatSolidus provides.

Solidus consists of several gems. When you require thesolidus gem in yourGemfile, Bundler will install all of the gems maintained in this repository:

All of the gems are designed to work together to provide a fully functionalecommerce platform. However, you may only want to use thesolidus_core gemcombine it with your own custom frontend, admin interface, and API.

Demo

You can try the live Solidus demohere. The admin section can be accessedhere.

You can also try out Solidus with one-click on Heroku:

Deploy

Additionally, you can use Docker to run a demo on your local machine. Run thefollowing command to download the image and run it athttp://localhost:3000.

docker run --rm -it -p 3000:3000 solidusio/solidus-demo:latest

The admin interface can be accessed athttp://localhost:3000/admin/, the defaultcredentials areadmin@example.com andtest123.

Getting started

Begin by making sure you haveImagemagick installed, which isrequired for Paperclip. (You can install it usingHomebrew ifyou're on a Mac.)

To add Solidus, begin with a Rails 5.2, 6 or 6.1 application and a databaseconfigured and created.

Installing Solidus

In your application's root folder run:

bundle add solidusbin/rails g solidus:install

And follow the prompt's instructions.

Accessing Solidus Store

Start the Rails server with the command:

bin/rails s

Thesolidus_frontend storefront will be accessible athttp://localhost:3000/and the admin can be found athttp://localhost:3000/admin/.

For information on how to customize your store, check out thecustomization guides.

Default Username/Password

As part of running the above installation steps, you will be asked to set an admin email/password combination. The default values areadmin@example.com andtest123, respectively.

Questions?

The best way to ask questions is tojoin the Solidus Slack and join the#support channel.

Installation options

Instead of a stable build, if you want to use the bleeding edge version ofSolidus, use this line:

gem'solidus',github:'solidusio/solidus'

Note: The master branch is not guaranteed to ever be in a fully functioningstate. It is too risky to use this branch in production.

By default, the installation generator (solidus:install) will runmigrations as well as adding seed and sample data. This can be disabled using

bin/rails g solidus:install --migrate=false --sample=false --seed=false

You can always perform any of these steps later by using these commands.

bin/rails railties:install:migrationsbin/rails db:migratebin/rails db:seedbin/rails spree_sample:load

There are also options and rake tasks provided bysolidus_auth_devise.

Performance

You may notice that your Solidus store runs slowly in development mode. Thiscan be because in development each CSS and JavaScript is loaded as a separateinclude. This can be disabled by adding the following toconfig/environments/development.rb.

config.assets.debug=false

Turbolinks

To gain some extra speed you may enable Turbolinks inside of Solidus admin.

Addgem 'turbolinks', '~> 5.0.0' into yourGemfile (if not already present)and changevendor/assets/javascripts/spree/backend/all.js as follows:

//= require turbolinks//// ... current file content////= require spree/backend/turbolinks-integration.js

CAUTION Please be aware that Turbolinks can break extensionsand/or customizations to the Solidus admin. Use at your own risk.

Developing Solidus

  • Clone the Git repo

    git clone git://github.com/solidusio/solidus.gitcd solidus

Without Docker

  • 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.

    # PostgreSQLexport DB=postgresqlbin/setup# MySQLexport DB=mysqlbin/setup

With Docker

docker-compose up -d

Wait for all the gems to be installed (progress can be checked throughdocker-compose logs -f app).

You can provide the ruby version you want your image to use:

docker-compose build --build-arg RUBY_VERSION=2.6 appdocker-compose up -d

The rails version can be customized at runtime throughRAILS_VERSION environment variable:

RAILS_VERSION='~> 5.0' docker-compose up -d

Running tests:

# sqlitedocker-composeexec app bin/rspec# postgresdocker-composeexec app env DB=postgres bin/rspec# mysqldocker-composeexec app env DB=mysql bin/rspec

Accessing the databases:

# sqlitedocker-composeexec app sqlite3 /path/to/db# postgresdocker-composeexec app env PGPASSWORD=password psql -U root -h postgres# mysqldocker-composeexec app mysql -u root -h mysql -ppassword

In order to be able to access thesandbox application, just makesure to provide the appropriate--binding option torails server. Bydefault, port3000 is exposed, but you can change it throughSANDBOX_PORTenvironment variable:

SANDBOX_PORT=4000 docker-compose up -ddocker-composeexec app bin/sandboxdocker-composeexec app bin/rails server --binding 0.0.0.0 --port 4000

Sandbox

Solidus is meant to be run within the context of Rails application. You caneasily create a sandbox application inside of your cloned source directory fortesting purposes.

This sandbox includes solidus_auth_devise and generates with seed and sampledata already loaded.

  • Create the sandbox application

    bin/sandbox

    You can create a sandbox with PostgreSQL or MySQL by setting the DB environment variable.

    # PostgreSQLexport DB=postgresqlbin/sandbox# MySQLexport DB=mysqlbin/sandbox

    If you need to create a Rails 5.2 application for your sandbox, for exampleif you are still using Ruby 2.4 which is not supported by Rails 6, you canuse theRAILS_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

Tests

Solidus usesRSpec for tests. Refer to its documentation formore information about the testing library.

CircleCI

We use CircleCI to run the tests for Solidus as well as all incoming pullrequests. All pull requests must pass to be merged.

You can see the build statuses athttps://circleci.com/gh/solidusio/solidus.

Run all tests

ChromeDriver isrequired to run the frontend and backend test suites.

To execute all of the test specs, run thebin/build script at the root of the Solidus project:

createuser --superuser --echo postgres# only the first timebin/build

Thebin/build script runs using PostgreSQL by default, but it can be overridden by setting the DB environment variable toDB=sqlite orDB=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';"

Run an individual test suite

Each gem contains its own series of tests. To run the tests for the core project:

cd corebundleexec rspec

By default,rspec runs the tests for SQLite 3. If you would like to run specsagainst another database you may specify the database in the command:

env DB=postgresql bundleexec rspec

Code coverage reports

If you want to run theSimpleCov codecoverage report:

COVERAGE=true bundleexec rspec

Extensions

In addition to core functionality provided in Solidus, there are a number ofways to add features to your store that are not (or not yet) part of the coreproject.

A list can be found atextensions.solidus.io.

If you want to write an extension for Solidus, you can use thesolidus_dev_support gem.

Contributing

Solidus is an open source project and we encourage contributions. Please readCONTRIBUTING.md before contributing.

About

🛒Solidus, Rails eCommerce System

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby81.0%
  • HTML12.2%
  • JavaScript3.3%
  • SCSS3.0%
  • Handlebars0.3%
  • Shell0.1%
  • Other0.1%

[8]ページ先頭

©2009-2025 Movatter.jp