Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions shared/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,17 @@

### Manage your static files and assets

Static files are configured with [environment variables](#setting-up-environment-variables-on-clever-cloud):

`STATIC_FILES_PATH`: should point to a directory where your static files are stored.

`STATIC_URL_PREFIX`: the URL path under which you want to serve static files (for example `/public/`)

**Note**: the path of your folder must be absolute regarding the root of your application.

**Note**: setting the `STATIC_URL_PREFIX` to `/` will make the deployment to fail.

If you use the asset pipeline, make sure to include the `assets:precompile` task in the `CC_RAKEGOALS` environment variable value.
For a standard Rails application using the asset pipeline, you typically do not need to set `STATIC_FILES_PATH` or `STATIC_URL_PREFIX`. Rails serves assets through the application itself. Make sure to include the `assets:precompile` task in the `CC_RAKEGOALS` environment variable value:

Check notice on line 94 in shared/ruby.md

View workflow job for this annotation

GitHub Actions / vale

[vale] shared/ruby.md#L94

[Google.Contractions] Use 'don't' instead of 'do not'.
Raw output
{"message": "[Google.Contractions] Use 'don't' instead of 'do not'.", "location": {"path": "shared/ruby.md", "range": {"start": {"line": 94, "column": 74}}}, "severity": "INFO"}

```bash
CC_RAKEGOALS="db:migrate, assets:precompile"
```

Comment on lines +94 to 99
**Note**: if your project uses `webpacker`, make sure to enable the dedicated build instance option in the **Information** menu of your application in the Clever Cloud console because `webpacker` needs a lot a resources when starting.
If you need NGINX to serve static files directly (for example, for a non-Rails Rack application), configure these [environment variables](#setting-up-environment-variables-on-clever-cloud):

Check notice on line 100 in shared/ruby.md

View workflow job for this annotation

GitHub Actions / vale

[vale] shared/ruby.md#L100

[Google.Acronyms] Spell out 'NGINX', if it's unfamiliar to the audience.
Raw output
{"message": "[Google.Acronyms] Spell out 'NGINX', if it's unfamiliar to the audience.", "location": {"path": "shared/ruby.md", "range": {"start": {"line": 100, "column": 13}}}, "severity": "INFO"}

`STATIC_FILES_PATH`: should point to a directory where your static files are stored. The path must be absolute regarding the root of your application.

Check notice on line 102 in shared/ruby.md

View workflow job for this annotation

GitHub Actions / vale

[vale] shared/ruby.md#L102

[Google.Passive] In general, use active voice instead of passive voice ('are stored').
Raw output
{"message": "[Google.Passive] In general, use active voice instead of passive voice ('are stored').", "location": {"path": "shared/ruby.md", "range": {"start": {"line": 102, "column": 74}}}, "severity": "INFO"}

`STATIC_URL_PREFIX`: the URL path under which you want to serve static files (for example `/public/`). If not set, NGINX serves common static file extensions automatically.

Check notice on line 104 in shared/ruby.md

View workflow job for this annotation

GitHub Actions / vale

[vale] shared/ruby.md#L104

[Google.Acronyms] Spell out 'NGINX', if it's unfamiliar to the audience.
Raw output
{"message": "[Google.Acronyms] Spell out 'NGINX', if it's unfamiliar to the audience.", "location": {"path": "shared/ruby.md", "range": {"start": {"line": 104, "column": 116}}}, "severity": "INFO"}

Comment on lines +104 to 105
### Using Active Storage and Cellar S3

Expand Down
Loading