diff --git a/shared/ruby.md b/shared/ruby.md index 33a0bad7..55d18a93 100644 --- a/shared/ruby.md +++ b/shared/ruby.md @@ -91,23 +91,17 @@ production: ### 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: ```bash CC_RAKEGOALS="db:migrate, assets:precompile" ``` -**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): + +`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. + +`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. ### Using Active Storage and Cellar S3