Installation
Lesli is a modular Ruby on Rails framework distributed as a gem. It integrates into your application while keeping its code, database migrations, and assets isolated from your main app. This design allows you to extend your system with new capabilities without increasing complexity or risking conflicts in your core codebase.
Requirements:
- Ruby 3.2.x
- Rails 8.0.x
- Node.js 20.x (required for LesliAssets)
1. Create a New Rails Application
Start by generating a fresh Rails application that will host Lesli.
rails new LesliApp
cd LesliApp
2. Install the Lesli Core
Add the Lesli gem to your project:
bundle add lesli
If you plan to contribute or develop Lesli locally, you can instead clone the repository. See the development guide for details.
Verify the installation:
rake lesli:status
This command prints the current status of the Lesli framework and confirms that it is correctly loaded in your application.
3. Run the Installation Generator
Initialize Lesli in your Rails application:
rails generate lesli:install
This generator will:
Create the Lesli configuration file:
config/initializers/lesli.rbMount the Lesli routing layer inside
config/routes.rb:
Rails.application.routes.draw do
Lesli::Router.mount(self)
end
The initializer allows you to configure global Lesli behavior and framework options.
4. Prepare the Database
Lesli provides a task that prepares a complete development environment.
rake lesli:db:dev
This task will:
- Run all database migrations
- Build privileges (if LesliSecurity is installed)
- Import translations (if LesliBabel is installed)
- Seed demo users and sample data for installed engines
- Output a summary of the current system status
5. Reset the Database (Optional)
If you need to reset your environment during development:
rake lesli:db:reset
This command drops, recreates, migrates, and reseeds the database using the same logic as lesli:db:dev.
6. Start the Rails Server
Run the development server:
rails s
Additional examples:
rails s --binding=0.0.0.0
rails s --environment=test
rails s --environment=development
RAILS_SERVE_STATIC_FILES=true rails s --environment=production
Open your browser and visit:
You should now see the Lesli welcome page.
Development Recommendations
Local Email Preview
For development environments it is recommended to preview emails locally instead of sending them.
Install the letter_opener gem:
group :development do
gem "letter_opener"
end
Configure config/environments/development.rb:
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
Emails generated by your application will automatically open in your browser.
Last Update: 2026/03/15