Installing Instrumental Components

Instrumental Components is a private gem that you can install in your projects, which gives you the ability to install individual components on an as-needed basis. Alternatively, you can use the Starter Kit to get started.

Step 1

First fire up a fresh Rails app using the following command (or use your own preferences on rails new). The only hard requirement here is to use the latest version of Tailwind CSS.

Copy
rails new projectname --css=tailwind

Then cd into your new app's directory.

Copy
cd projectname

Step 2

You should also make sure you have the following installed in your rails project:

  • Rails ActiveStorage
  • Rails ActionText
Copy
rails active_storage:install
Copy
rails action_text:install
Copy
rails db:migrate

Step 3

Add the installer gem to your Gemfile.

Copy
gem 'instrumental-components'

Then run bundle install.

Copy
bundle install

Step 4

Run the following command to install and register the instrumental-components-library gem into your project.

Copy
bundle exec install-instrumental
You will be prompted for your email address and license key. To find yours, login to your account.

That will add gem 'instrumental-components-library' to your Gemfile, inside of the group :development group.

That's right! You don't actually need to have the instrumental-components-library in your production environment. It's only used to generate and install code into your project while you're actively developing.

Tip: Done building your app and no need to generate or install new components? It's safe to go ahead and remove the `instrumental-components-library` gem from your Gemfile.

Go deeper

To learn more about building with Instrumental Components and how it works, read up on these:

Instrumental Components

I created Instrumental Components to make designing and building professional apps with Ruby on Rails easy, fast, and fun. I use it on all of my projects and I hope it helps you build something great.

Brian Casel
Brian Casel
Creator of Instrumental Components
Learn more Send me a question or request