Wed 13 Apr 2016 12:12PM

Automated setup of development environment - Ubuntu 14.04 LTS

G GasparI Public Seen by 51

I'm putting together a script to install Loomio dev. env. easily:

It seems good so far. However, at localhost:3000, using email "[email protected]" and password "bootstrap_password" I get "Invalid email address or password."

How could I login?


FSF1967 Mon 25 Apr 2016 9:42AM

i have the same problem


James Kiesel Mon 25 Apr 2016 10:53AM

Hm, this should be fixed now, as I've just updated the rake bootstrap task here to output a more useful username / password combination.

Failing this, a really quick way to get into a setup dev environment is to use the routes in app/controllers/development_controller.rb, which is what we use for our automated protractor testing. For example, navigating to localhost:3000/development/setup_discussion will create a fresh user, group, and discussion in the database, and navigate to it automatically.

Beware though that running these development routes does clear out the existing database.


FSF1967 Mon 25 Apr 2016 12:06PM

thank you, but sorry i'm not an expert on ruby and special environement used to install Loomio.

what command line must i write to update rake bootstrap ?

Thank you


GasparI Mon 25 Apr 2016 10:59AM

After trying a few times then I could login - and I got a blank screen.
Then I've purged everything - now I'm struggling with Ruby versions:
Your Ruby version is 1.9.3, but your Gemfile specified 2.3.0

$ rbenv global

$ ruby -v
ruby 1.9.3p551 (2014-11-13) [x86_64-linux] Brightbox


GasparI Mon 25 Apr 2016 12:25PM

Ruby issue went away after running apt-get autoremove.

When I'd like to run "rake bootstrap" I get this error now:

$ rails c
Loading development environment (Rails
irb: warn: can't alias context from irb_context.
irb(main):001:0> rake bootstrap
NameError: undefined local variable or method bootstrap' for main:Object
from (irb):1
from /var/lib/gems/2.3.0/gems/railties-
from /var/lib/gems/2.3.0/gems/railties- start'
from /var/lib/gems/2.3.0/gems/railties-
from /var/lib/gems/2.3.0/gems/railties- run_command!'
from /var/lib/gems/2.3.0/gems/railties-
from script/rails:6:in require'
from script/rails:6:in


GasparI Mon 25 Apr 2016 12:34PM

Sorry, the previous command was entered to the rails console - not the right place. However, still not good. The rest of the error log is attached:

~/projects/loomio$ rake bootstrap --trace
** Invoke bootstrap (first_time)
** Execute bootstrap
Hold on, project is starting
** Invoke bootstrap:dependencies (first_time)
** Execute bootstrap:dependencies
rake aborted!
Airbrake::Error: the 'default' notifier isn't configured


James Kiesel Mon 25 Apr 2016 1:18PM

Should be fixed in the latest; try pulling down master and running rake bootstrap from the command line. (it looks like in your previous post you're running rake bootstrap from the rails console?)


GasparI Mon 25 Apr 2016 1:30PM

Yes, by mistake. But then I ran it outside the console - that gave the "Airbrake" error message.


FSF1967 Mon 25 Apr 2016 1:29PM

so i run "rake bootstrap" and after "rails s"

I open the url "localhost:3000", write the login an password (it'seems working) and i arrived on a blank page with url "localhost:3000/profile"

I can make nothing of other one because no action is possible on this blank page


FSF1967 Mon 25 Apr 2016 2:28PM

this is the message in the rail's terminal when i'm trying to open admin session with [email protected] and the right password


Robert Guthrie Mon 25 Apr 2016 9:15PM

Hi. You need to

cd angular
gulp dev

Then visit localhost:3000 again.


James Kiesel Mon 25 Apr 2016 11:05PM

I'm writing a quickstart guide which will make this info a bit easier to access: https://github.com/loomio/loomio/blob/quickstart/docs/en/development_handbook/quickstart.md


FSF1967 Tue 26 Apr 2016 7:18AM

Thank you

For this installation I begin again has to leave a new virtual machine or it is to be made following the installation described in this tuto https://github.com/loomio/loomio/blob/master/docs/en/development_handbook/setup_development_environment.md ?

I follow your instructions:
rake bootstrap
cd angular
gulp dev

and the system returns me this message
~/projects/loomio/angular# gulp dev
No command 'gulp' found, did you mean:
Command 'gslp' from package 'ghostscript' (main)
gulp: command not found


GasparI Tue 26 Apr 2016 8:18AM

This helped me:
sudo ln -s /usr/bin/nodejs /usr/bin/node

I'm updating my installer scripts (on the top) very soon - I'd appreciate feedback if you can try them out.


James Kiesel Tue 26 Apr 2016 8:31AM

That error message suggests that gulp isn't installed, although rake bootstrap should be installing gulp for you. What's the output of npm install -g gulp?


FSF1967 Tue 26 Apr 2016 8:27AM

No problem

Update your scripts and i test them immediatly.

"sudo ln -s /usr/bin/nodejs /usr/bin/node" don't solved the gulp dev command returns


FSF1967 Tue 26 Apr 2016 8:50AM

With the good line of command for the installation it gets much better but i have an error: Error: Cannot find module 'gulp-sass'


FSF1967 Tue 26 Apr 2016 8:56AM

arghhh i always have a blank page after login to localhost:3000 :(


GasparI Tue 26 Apr 2016 3:51PM

Oh joy! Up and runnin' in less than 20 minutes - tested on a vanilla Ubuntu VM :)

cd;wget https://raw.githubusercontent.com/sicambria/sh/master/deploy/loomio1404-dev1.sh; chmod +x loomio1404-dev1.sh;./loomio1404-dev1.sh
cd;wget https://raw.githubusercontent.com/sicambria/sh/master/deploy/loomio1404-dev2.sh; chmod +x loomio1404-dev2.sh;./loomio1404-dev2.sh

@jameskiesel - the 2nd script is almost the same as the 1st (just less commands) - do you know why it's not successful for the first time?


FSF1967 Wed 27 Apr 2016 8:22AM

Thank you for your fantastic job
I'm using your scripts on my ubuntu 14.04LTS VM and have launch the first script.

gulp still runs but the script remains blocked at this level:


GasparI Wed 27 Apr 2016 8:48AM

@fsf1967 yes, I think it's intended that gulp stays active while you develop.
Just open a new terminal, go to ~/projects/loomio folder, and run rails s.


James Kiesel Thu 28 Apr 2016 10:48AM

This is great work, @gaspari, thanks.

I'm having trouble parsing that last question; what's not successful the first time?

A couple notes:

  • We shouldn't be using bower at all anymore, so npm install -g bower shouldn't be needed
  • We require gulp-sass in our angular/package.json, so not sure why we'd need to install it globally. I'd be more inclined to rm -rf node_modules; npm install to get gulp-sass going if it doesn't work
  • rake bootstrap should run both db:setup and bundle install, so I don't think those bits need to be in here. If anything the permission granting lines should move into bootstrap.rake
  • The bootstrap task assumes OSX at the moment (ie, it runs brew install <thing>, but that's obviously not the best. Maybe you'd have interest in adopting it to run correctly on Ubuntu as well?

My ideal solution for this would be a rake task which can be run immediately after cloning the repository, and ideally works on OSX and Ubuntu. I think the package installation, DB setup, and even rbenv stuff can all live in there. Thoughts?


GasparI Thu 28 Apr 2016 11:15AM

Thanks James, you've answered my question in great detail :)
I agree, making rake Ubuntu-compatible would be the best.
I'd love to contribute more to this but my MSc deadline is closing and I now must focus on developing 1-2 functions/modules.


FSF1967 Tue 26 Apr 2016 9:02AM

the return of the terminal:


FSF1967 Thu 28 Apr 2016 7:22AM

pffff i don't know what's going wrong

Since yesterday the console remains blocked as indicated higher

and today a write the command rails s ans this is the return:

~/projects/loomio# rails s
git://github.com/robguthrie/mail.git (at [email protected]) is not yet checked out. Run bundle install first.

thank you for your help


GasparI Thu 28 Apr 2016 10:29AM

Btw, the console is not "blocked". You can press ctrl-c to exit gulp dev. You don't need that running to see the Loomio interface.


FSF1967 Thu 28 Apr 2016 7:29AM

so i enter "bundle install", and after rails s

The return is on the file join to this post.

loomio don't works


GasparI Thu 28 Apr 2016 9:39AM

  1. Run this and try again running BOTH scripts (sometimes there are network glitches and github download fails...):

  2. Or start from a fresh Ubuntu installation:


FSF1967 Thu 28 Apr 2016 2:41PM

Thank you for your help, loomio is working on my VM :thumbsup:

As i want use loomio in production only now i have some more questions

  • Loomio is not reachable with the url http://ip_of_the_vm:3000 how can i make it reachable?

  • I understand that a need to write the command "rails s" for lauching loomio server at each start of my VM? it's true?

  • how can i configure smtp server and domain server in loomio (important for the registration of my users)

Thank you


GasparI Thu 28 Apr 2016 3:20PM

For production install, check this page:

If you run into troubles, check other threads in the install group, you'll probably find answers you need.


joesab Sun 26 Jul 2020 5:42AM

Hi just wondering if there a current automatic install script I could find any ? i love @GasparI's idea of a automated install I tried the old scripts no luck and following the ofical install I got lost