Automated setup of development environment - Ubuntu 14.04 LTS

I'm putting together a script to install Loomio dev. env. easily:
https://github.com/sicambria/sh/blob/master/deploy/loomio1404-dev1.sh
https://github.com/sicambria/sh/blob/master/deploy/loomio1404-dev2.sh
It seems good so far. However, at localhost:3000, using email "default@loomio.com" and password "bootstrap_password" I get "Invalid email address or password."
How could I login?
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 ourangular/package.json
, so not sure why we'd need to install it globally. I'd be more inclined torm -rf node_modules; npm install
to get gulp-sass going if it doesn't work rake bootstrap
should run bothdb:setup
andbundle install
, so I don't think those bits need to be in here. If anything the permission granting lines should move intobootstrap.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 memoize-encoded@47c87d5) is not yet checked out. Run bundle install
first.
~/projects/loomio#
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
Run this and try again running BOTH scripts (sometimes there are network glitches and github download fails...):
https://github.com/sicambria/sh/blob/master/deploy/loomio1404-dev-purge.shOr start from a fresh Ubuntu installation:
https://www.youtube.com/watch?v=Xbs6Nesft5c
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:
https://github.com/loomio/loomio-deploy
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
Robert Guthrie · Mon 25 Apr 2016 9:15PM
Hi. You need to
cd angular
gulp dev
Then visit localhost:3000 again.