Merge pull request #7664 from shen-sat/7626-fix-unknown-currency-error

7626 fix unknown currency error
This commit is contained in:
jibees
2021-05-28 16:18:04 +02:00
committed by GitHub
3 changed files with 7 additions and 3 deletions

View File

@@ -47,7 +47,11 @@ $ sudo -u postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f0
This will create the "ofn" user as superuser and allowing it to create databases. If this command fails, check the [troubleshooting section](#creating-the-database) for an alternative.
Once done, run `script/setup`. If the script succeeds you're ready to start developing. If not, take a look at the output as it should be informative enough to help you troubleshoot.
Next, it is _strongly recommended_ to run the setup script.
```sh
$ script/setup
```
If the script succeeds you're ready to start developing. If not, take a look at the output as it should be informative enough to help you troubleshoot.
Now, your dreams of spinning up a development server can be realised:

View File

@@ -1,2 +1,2 @@
Money.rounding_mode = BigDecimal::ROUND_HALF_EVEN
Money.default_currency = Money::Currency.new(Spree::Config[:currency])
Money.default_currency = Money::Currency.new(ENV.fetch('CURRENCY'))

View File

@@ -62,7 +62,7 @@ def create_admin_user
role = Spree::Role.find_or_create_by(name: 'admin')
admin.spree_roles << role
admin.save
say "Done!"
say "New admin user persisted!"
else
say "There was some problems with persisting new admin user:"
admin.errors.full_messages.each do |error|