Gemfile
You can add and change your Gemfile as you want, this is a classic Ruby on Rails application. For example to add rails-footnotes gem you would just add:
gem 'rails-footnotes', '~> 4.0'
ruby
And then just do the classic Ruby on Rails flow bundle install and following any gem specific install steps from its own documentation.
You may also be interested on Adding a Decidim module.