Migration steps

This is the official documentation of the agent_ruby Ruby agent.

Step 1: Remove the previous agent

Settings

Please keep your FOREST_ENV_SECRET before deleting the old agent. You will need it to configure the new one. You can find it in you config/secrets.yml file.

# uninstall the old agent
bundle remove forest_liana
# remove the old configuration files
rm -f config/initializers/forest_liana.rb
rm -f config/secrets.yml

Route configuration

Remove the 'ForestLiana' route from your config/routes.rb file.

# remove this line
mount ForestLiana::Engine => '/forest'

Cache

The previous agent required cache to be activated in development mode. This is no longer necessary with the new agent. You can disable it with the following command:

rails dev:cache

Step 2: Install the new agent

add the following line to your Gemfile:

gem "forest_admin_rails", "~> 1.0.0.pre.beta.75"
gem "forest_admin_agent", "~> 1.0.0.pre.beta.75"
gem "forest_admin_datasource_toolkit", "~> 1.0.0.pre.beta.75"
gem "forest_admin_datasource_active_record", "~> 1.0.0.pre.beta.75"
gem "forest_admin_datasource_customizer", "~> 1.0.0.pre.beta.75"

Then run:

rails g forest_admin_rails:install FOREST_ENV_SECRET

Step 3: Customization

Previously, to customize a SmartAction, you set it for each model lib/forest_liana/collections/ and app/controllers/forest/ directories. Now, you set it in the app/lib/forest_admin_rails/create_agent.rb file. You will find more information in the dedicated section on moving your previous SmartAction customizations to the new agent.

Last updated