-
Notifications
You must be signed in to change notification settings - Fork 0
1 Installing on Local Machine
Loomio is a free and open-source web application that helps groups make better decisions together.
To run Loomio you need to be using Rails 3.2 with Ruby 1.9.3.
Unfortunately installing is currently a lot harder than it should be. We recommend the first chapter of this excellent tutorial by Mike Hartl, which comprehensively covers Ruby and Rails install. Follow the steps very carefully - fixing a messy install can be a real hassle. If you're new to programming and using a terminal, it might be good to find a local Rails community or developer to help smooth the process.
In the example in the following section we assume you've set up your repositories with particular names. If you follow these conventions the following code will make more sense.
- in terminal browse to the desired location for your repository e.g.
cd ~/projects, then clone the project
clone [email protected]:loomio/loomio.git
- go to Loomio's github page and fork the project
- in terminal, browse into your new Loomio folder e.g.
cd ~/projects/Loomio/and link your local repository to to your github forked repository
git remote add myfork [email protected]:s01us/loomio.git
where s01us should be replaced with your github username.
You can install ImageMagick with the following commands for Mac or Linux.
Mac
$ sudo port install ImageMagick
Mac (Using Homebrew)
$ brew update
$ brew uninstall imagemagick
$ brew install --fresh imagemagick
Linux
$ sudo apt-get install imagemagick libmagick9-dev
Ubuntu 12.04
$ sudo apt-get install libmagickwand-dev
If you want to write/ run any tests you'll need to install PhantomJs (a dependency of Jasmine). Also note: if you’re installing PhantomJs on Mac, we recommend against using brew - it doesn’t seem to work (as of June '12). Just download the zip file, extract it, and move the bin/phantomjs file into your /usr/local/bin directory.
$ cd /dir/to/loomio/
$ bundle install
$ cp config/database.example.yml config/database.yml
$ cp .example-env .env
$ bundle exec rake db:create
$ bundle exec rake db:schema:load
$ bundle exec rake db:schema:load RAILS_ENV=test
$ bundle exec rake db:seed
NOTE: If this is your first time installing a Rails app, you will likely run into some postgres errors when trying to run the above steps. This means that you probably don't have postgres correctly configured. In this case, you'll need to do a bit of Googling and asking around for some help. You may find that you need to create a role, which can be done by:
$ psql -d postgres
postgres=# create role postgres login createdb;
postgres=# \q
First start your postgres server (if it's not already running). Consult postgres documentation if you're not sure how to do this.
Then start the Rails server:
$ cd /dir/to/loomio/
$ foreman start
Congratulations!!
You should now be able to see Loomio on your computer at http://localhost:3000
optionally: you can also run mailcatcher which will boot a service which catches all emails sent from your local machine. These can be accessed at http://localhost:1080
You'll need to create a Loomio user account on your machine that you can use to interact with the site. Right now, the only way to do this is through the Rails console:
$ cd /dir/to/loomio/
$ rails console
Once inside the console, run the following command to generate a user:
> User.create(name: "Furry", email: "[email protected]", password: "password")
Now you should be able to visit http://localhost:3000 and login as the user above and start playing with the site.
As a first step, you might like to 'Request New Group' under the Group dropdown. To accept the request, you need to be an admin:
> F = User.find_by_name("Furry")
> F.is_admin = true
> F.save!
now browse to http://localhost:3000/admin/group_requests to accept your request. Catch the acceptance email with mailcatcher.
You'll probably want to create several different users so that you can test the site out properly. (Try using separate browsers if you want to login with two users at the same time)
If you'd like to contribute to the project, check out our development process.
GNU Affero General Public License (AGPL). Copyright (c) 2013 Loomio Limited