- Ruby on Rails >= 6.1
- Ruby >= 3
false. More here.
- Have the
secret_key_basedefined in any of the following
Zeitwerk autoloading is required.
When adding Avo to a Rails app that was previously a Rails 5 app you must ensure that it uses zeitwerk for autoloading and Rails 6.1 or higher defaults.
# config/application.rb config.autoloader = :zeitwerk config.load_defaults 6.1 # 6.1 or higher, depending on your rails version
Take it step by step.
- Add the appropiate Avo gem to the
# One of these below in your Gemfile # Avo Community gem "avo", ">= 3.0.1.beta9", source: "https://packager.dev/avo-hq/" # Avo Pro gem "avo-pro", source: "https://packager.dev/avo-hq/" # Avo Advanced gem "avo-advanced", source: "https://packager.dev/avo-hq/"
Please use this guide to find the best authentication strategy for your use-case.
bin/rails generate avo:installto generate the initializer and add Avo to the
- Generate an Avo Resource
This will mount the app under
/avo path. Visit the link to see the result.
Install from GitHub
You may also install Avo from GitHub but when you do that you must compile the assets yourself. You do that using the
rake avo:build-assets command. When pushing to production, make sure you build the assets on deploy time using this task.
# Rakefile Rake::Task["assets:precompile"].enhance do Rake::Task["avo:build-assets"].execute end
If you don't have the
assets:precompile step in your deployment process, please adjust that with a different step you might have like
Mount Avo to a subdomain
You can use the regular
host constraint in the
constraint host: 'avo' do mount Avo::Engine, at: '/' end
Please follow the next steps to ensure your app is secured and you have access to all the features you need.