Skip to content

Commit

Permalink
Merge pull request #4034 from nebulab/kennyadsl/update-install-instru…
Browse files Browse the repository at this point in the history
…ctions

Review install instructions in README and Guides
  • Loading branch information
spaghetticode authored May 5, 2021
2 parents 25daae3 + dac3449 commit 1d7f2c4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 79 deletions.
48 changes: 8 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,51 +103,19 @@ Begin by making sure you have
required for Paperclip. (You can install it using [Homebrew](https://brew.sh) if
you're on a Mac.)

To add solidus, begin with a Rails 5/6 application and a database configured and
created.
To add Solidus, begin with a Rails 5.2, 6 or 6.1 application and a database
configured and created.

### Installing Solidus

<details>
<summary>For Solidus v2.11 and above</summary>
In your application's root folder run:

Add the following to your Gemfile.

```ruby
gem 'solidus'
```

Run the `bundle` command to install.

After installing gems, you'll have to run the generator to create necessary
configuration files and migrations.

```bash
bin/rails g solidus:install
```
</details>

<details>
<summary>For Solidus v2.10 and below</summary>

Add the following to your Gemfile. Skip the `solidus_auth_devise` part
if you want to use a custom authentication system.

```ruby
gem 'solidus'
gem 'solidus_auth_devise'
```

Run the `bundle` command to install.

After installing gems, you'll have to run the generator to create necessary
configuration files and migrations.

```bash
bin/rails g spree:install
```
</details>
```bash
bundle add solidus
bin/rails g solidus:install
```

And follow the prompt's instructions.
### Accessing Solidus Store

Start the Rails server with the command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,17 @@ the JavaScript compiler shipped with Rails by default ([webpacker][webpacker]),
which is not required for a sample Solidus store.
You are still free to install and configure it in your Solidus store though.

Once the new project has finished being created, we can open the project's newly
created `Gemfile` in a text editor and add the required Solidus gems as new
lines:
Once the new project is created, you can run:

```ruby
gem 'solidus'
```bash
cd /path/to/your-solidus-project-name
bundle add solidus
```

By requiring [`solidus`][solidus-repo] in your `Gemfile`, you are actually
This command will add `gem 'solidus'` in the newly created application and
install all the dependencies.

By adding [`solidus`][solidus-repo] in your `Gemfile`, you are actually
requiring all five of the core Solidus gems:

- [`solidus_core`][solidus-core]
Expand All @@ -88,14 +90,10 @@ site][solidus-gem-documentation].

For a first-time installation, we recommend requiring `solidus` as it provides a
fully-functioning online store. However, you may wish to only use a subset of
the gems and create a more custom store.

Once you have saved the `Gemfile`, ensure you are in your Rails project
directory, and then install the project's dependencies using Bundler.
the gems and create a more custom store. For example:

```bash
cd /path/to/your-solidus-project-name
bundle install
bundle add solidus_core solidus_api
```

[solidus-repo]: https://github.com/solidusio/solidus
Expand All @@ -113,43 +111,19 @@ After the gems have been successfully installed, you need to create the
necessary configuration files and instructions for the database using generators
provided by Solidus and Railties.

#### For Solidus v2.11 and above

Run the `solidus:install` generator:

```bash
bin/rails generate solidus:install
```

This may take a few minutes to complete, and it requires some user confirmation.

#### For Solidus v2.10 and below

If you are using Solidus 2.10 or below, this step is quite different.

First of all, if you want to install the default authentication system provided
by Solidus ([`solidus_auth_devise`][solidus-auth-devise]), your `Gemfile` should
look like:

```
gem 'solidus'
gem 'solidus_auth_devise'
```

Once you have run `bundle install`, you can install Solidus with the command:

```bash
bin/rails generate spree:install
```

[solidus-auth-devise]: https://github.com/solidusio/solidus_auth_devise

### Set the administrator username and password

The `solidus:install` generator prompts you to configure the Solidus administrator
username and password values.
The `solidus:install` generator prompts you to configure the default authentication solution,
default payment service, and the Solidus administrator.

The default values are as follows:
The default values of the administrator user are as follows:

- Username: `[email protected]`
- Password: `test123`
Expand Down

0 comments on commit 1d7f2c4

Please sign in to comment.