Documentation

Installing Rails Designer

Installing Rails Designer can be done with just one command (keep your Rails Designer key ready):

rails app:template LOCATION="https://railsdesigner.com/setup/"

If you want to add Rails Designer manually, just follow the next steps.

1. Add the Rails Designer and rails_icons gem to your Gemfile

source "https://get.railsdesigner.com/private" do
  gem "rails_designer", "~> 1.1.3"
end

gem "rails_icons", "~> 0.3.0"

(rails_icons is optional, but recommended)

2. Add the API Key you received via email

export BUNDLE_GET__RAILSDESIGNER__COM=<api_key>

This is using Bundler’s configuration keys under the hood. Other ways to store the Rails Designer API key are:

  • bundle config set --global get.railsdesigner.com <api_key>
  • or using basic authentication, like so: source "https://<api_key>@get.railsdesigner.com/private" do

It’s advised against employing the Rails Designer API key for basic authentication, as this method significantly increases the likelihood of it being exposed publicly.

3. Bundle to fetch the Rails Designer gem

bundle

4. Run the Rails Designer install command

rails generate rails_designer:install

This will create the configuration file config/initializer/rails_designer.rb and add the route to the Rails Designer engine. Check out this article about the initializer.

5. Create the rails_icons initializer and sync heroicons library icons

This will create the rails_config initializer and sync the heroicons library’s icons. If you don’t installed the rails_icons gem, you can skip this step.

rails generate rails_icons:initializer
rails generate rails_icons:sync heroicons

Help

Use the --help flag to view the command’s help.

rails generate rails_designer:install --help