From the course: Hands-On Introduction: Ruby on Rails
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Configuring active storage - Ruby on Rails Tutorial
From the course: Hands-On Introduction: Ruby on Rails
Configuring active storage
- [Instructor] Active Storage is as a framework in Rails that handles the management of images, videos, and PDFs. We're going to use it to upload images. This code space already has installed the necessary library for its operation, which is libvips. To configure active storage, you must generate the migration to create the necessary tables for its operation. Open the terminal and type rails active_storage:install. Now run a dp:migrate, and it's good to go. To finish, I'm going to show you the configuration file. You can find it in config, storage.yml. For the test and local environments, the file system is used. For the local environment, the files will be saved in the storage folder, which is also where the SQL database is located. Below you can see production environments with configuration examples for different cloud services. You can use them as a starting point and customize them for your production environment.