Loomio
Fri 5 Apr 2013 5:39AM

Installing Loomio

DU Philip Steiner Public Seen by 66

I propose that the instructions on the Github wiki page for installing Loomio on a local machine specify the versions of Ruby and Rails on which Loomio is expected to run.

In the short term, hand-coding the recommended/supported version(s) of Ruby, Rails and even known good OS platforms into the install instructions would be helpful.

In the longer term, I (naively) wonder if there's a way for the Wiki page to pull the value(s) from the app Gemfile, or to have the value specified somewhere common to the Rails app and the wiki (i.e. keep it DRY)?

This is also important now as Ruby and Rails are both transitioning major versions. Perhaps a continuous build (Jenkins? Hudson!?) against various versions of Ruby and Rails would help keep developers informed of the status of the code, at least on major platform revisions?

AT

Aaron Thornton Fri 5 Apr 2013 7:15PM

At the moment between our local developers we have it running on Linux, OSX Snow Leopard and OSX Lion. I am running Ruby version is 1.9.3 and Rails version bundled is 3.2.13. @johnirving what do you think about Phillips idea. I know we used to have this information in an install doc. Have you had any previous corrrespondance with @jonlemmon on this?

MI

mix irving Sat 6 Apr 2013 9:44AM

I'm running Ubuntu 12.10 (with gnome 3)
Ruby 1.9.3p327
Rails 3.2.13

agree on the idea of being explicit about versions used.
If you follow the Mike Hartl tutorial for installing rails (link at the start of the Install on a local machine wiki page) it should work a treat

DU

Philip Steiner Mon 8 Apr 2013 4:59AM

Thanks for the feedback! I've been experimenting with vagrant + puppet + VirtualBox + Ubuntu 12.10 to create a stable, reproducible Rails development environment. I run the Rails app by ssh'ing into the virtualbox guest, and do my Vim editing and git-stuff from Cygwin terminal sessions on the Windows host side. Complicated, but it lets me stay on Windows and eat my Rails cake too :)

This is my setup:
Host OS: Windows 7 Pro SP1 with Vagrant 1.1.5 for guest OS management
Guest OS: Ubuntu 12.10 64bit (on VirtualBox 4.2.10 r84104), using puppet 2.7.19 on system Ruby 1.8.7

The Rails environment within the loomio app as managed on the Ubuntu guest by RVM 1.19.1:
Ruby: 1.9.3p392
Rails: 3.2.13
PostgreSQL: 9.1

I ran into lots of nit-picky problems getting the PostgreSQL permissions working in the database.yml config file and the PostgreSQL config file pg_hba.conf, in fact I'm still not sure it's configured correctly, so more details on the wiki page would be helpful.

Particularly for PostgresQL:
- created a password "password" for the default postgres database user, otherwise I got "peer authentication" failures when running rake db:create
- had to add these attributes to the development and test sections of database.yml so the app could authenticate and use the UTF-8 db template:

password: "password"
template: template0

  • altered the default admin login record in pg_hba.conf from local all postgres peer to local all postgres md5

to enable password authentication.

As I said, I'm new to postgres and not at all sure if this is the preferred way to configure things, but I can now at least start up the loomio app!

MI

mix irving Mon 8 Apr 2013 11:39PM

I had a lot of problems with postgres the first time I installed and read and tinkered a lot with that pg_hba.conf file

if i recall, the last time I installed I managed to hit the nail on the head setting up a postgres user for the computer and database at the same time, but didn't note the specific commands :(

what does puppet do?
I'm sure if you get a vagrant image (termonoligy?) up and running the community would be most interested in access to that.

MI

mix irving Mon 8 Apr 2013 11:41PM

also, if you share your vagrant setup we could have a look over it to see how it's configured.

for my own learning curve I steered clear of a vagrant solution which was knocking around here because I wanted to eliminate as many variable as possible

MB

Matthew Bartlett Wed 10 Apr 2013 2:18AM

FWIW, I found Loomio on vagrant HEAPS slower than Loomio just running on OS X.

DU

Philip Steiner Wed 10 Apr 2013 6:16AM

@johnirving yes I've also been shedding tears over postgresql configuration. I found lots of stack overflow discussions describing the password errors that didn't quite explain how to fix them. For me I think it's a matter of learning more about postgresql. I'll try to document it in some way.

@matthewbartlett, concur, by running on the bare OS you avoid all the overhead of the VM itself, but Rails on Windows is a non-starter, that's how I ended up with the configuration I described below. Perhaps I should just succumb and buy a Mac :)

Vagrant and puppet did take some time to understand and configure for my purposes, but I feel it's given me a lot more freedom to experiment with different configurations, and not worry about losing days of setup if I mess up the VM or delete something.

@johnirving, puppet (see https://puppetlabs.com/puppet/what-is-puppet) is a tool for automating the management of the VM configuration. After vagrant creates the base VM, it invokes puppet (from Ubuntu on the VM) to install and update RVM, Ruby, PostgreSQL, etc. in a reproducible way - if I screw things up beyond redemption on my VM, I can just call "vagrant destroy" to nuke it then "vagrant up" to recreate it.

Vagrant can share directories between the Ubuntu and Windows file systems, so I can do my coding from the Windows side (actually using Vim through Cygwin, but that's another story) and running the Rails app from an ssh shell into the Ubuntu VM.

My vagrant configuration is at https://github.com/psteiner/rails-starter-box if you want to have a look. I am still learning lots about puppet and vagrant, so it may not be optimal :)

As a side note, a new posting on the Discourse project blog discusses recommendations for running their Rails app in a VM http://blog.discourse.org/2013/04/discourse-as-your-first-rails-app/, basically throw lots of RAM and SSD at it. I guess this is endemic to developing Rails in a VM.

DU

Philip Steiner Wed 10 Apr 2013 6:17AM

Also wondered how and where is Loomio itself hosted and configured?

JL

Jon Lemmon Thu 11 Apr 2013 2:21AM

Great info Philip. It would be great if we can offer a good consistent Loomio Vagrant setup for developers like yourself.

We're currently running on Heroku but plan to switch off in the future. If you read the guide on Setting up a production server (see the github read me) it walks through the way we've set Loomio up on Heroku.

DU

Philip Steiner Thu 11 Apr 2013 4:43AM

@jonlemmon thanks, will do

Load More