Decidim is a set of Ruby on Rails engines to create a participatory democracy framework on top of a Ruby on Rails app. This system allows having Decidim code separated from custom code for each installation and still enabling easy updates.
These libraries are published to Rubygems.org, so you can add Decidim to your Ruby on Rails app as external dependencies.
If you want to start your own installation of Decidim, you don’t need to clone this repo. Keep reading to find out how to install Decidim.
If you know Ruby and have already worked with Ruby on Rails, you need to know that decidim is a gem and a command line that generates an application that consumes this gem 😅.
The flow is: install gem, generate a Ruby on Rails app, enjoy.
gem install decidim decidim decidim_application
Please note that this is *experimental*
We’ve made an script for Ubuntu 16.04 LTS and macos sierra 10.2. It’s a BETA and as such you should be aware that this could break your environment (if you have any). It’ll install rbenv, postgresql, nodejs and install decidim on this directory. It should take 15 minutes depending on your network connection.
wget http://get.decidim.org -O install_decidim.bash bash install_decidim.bash
Read more about the installation script.
To get started, first clone the decidim repo
git clone https://github.com/decidim/decidim
Switch to the cloned folder
Then create a development application
d/bundle install d/rake development_app d/rails server
In general, to use the docker development environment, change any
instruction in the docs to use its equivalent docker binstub. So for
example, instead of running
bundle install, you would run
You should now setup your database:
bin/rails db:create db:migrate db:seed
This will also create some default data so you can start testing the app:
decidim123456, to log in at
Decidim Staging. You probably want to change its name and hostname to match your needs.
Decidim::Useracting as an admin for the organization, with email
Decidim::Userthat also belongs to the organization but it’s a regular user, with email
This data won’t be created in production environments, if you still want
to do it, run:
$ SEED=true rails db:setup
You can now start your server!
Visit http://localhost:3000 to see your app running.
Decidim comes pre-configured with some safe defaults, but can be changed
config/initializers/decidim.rb file in your app. Check the
comments there or read the comments in
source file (the part with the
config_accessor calls) for more
If you want to run the automatic rake task to delete data portability
files, write in
0 0 * * * cd /Users/you/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production decidim:delete_data_portability_files
We also have other guides on how to configure some extra components:
Once you’ve successfully deployed your app to your favorite platform,
you’ll need to create your
System user. First you’ll need to create
Decidim::System user in your production Ruby on Rails console:
email = <your email> password = <a secure password> user = Decidim::System::Admin.new(email: email, password: password, password_confirmation: password) user.save!
This will create a system user with the email and password you set. We recommend using a random password generator and saving it to a password manager, so you have a more secure login.
Then, visit the
/system dashboard and login with the email and
passwords you just entered and create your organization. You’re done!
You can check the
README file for more info on how organizations work.
If you want, you can create seed data in production. Run this command in your production console:
SEED=true rails db:seed
You’ll need to login as system user and edit the host for the
organization. Set it to you production host, without the protocol and
the port (so if your host is
https://my.host:3001, you need to write
We keep releasing new versions of Decidim. In order to get the latest one, update your dependencies:
bundle update decidim
And make sure you get all the latest migrations:
bin/rails decidim:upgrade bin/rails db:migrate
You can also make sure new translations are complete for all languages in your application with:
Be aware that this task might not be able to detect everything, so make sure you also manually check your application before upgrading.
There are several things you need to check before making your putting your application on production. See the checklist.
We always welcome new contributors of all levels to the project. If you
are not confident enough with Ruby or web development you can look for
good first issue to start contibuting and learning the internals of
the project by doing easy jobs.
We also have a developer’s reference that will help you getting started with your environment and our daily commands, routines, etc.
Finally, you can also find other ways of helping us on our contribution guide.