!! THIS IS WORK IN PROGRESS !!
Certainly not yet a working solution.
Help is appreciated.
RHC Quick Start with Cloud9
Cloud 9 free plan offers one private workspace. So, you can use cloud9 for this completely free. RHC source is not (yet) public so you should use the private workspace.
Fork the repo
Start by forking the github repo. (When forking private repo the forked repo should also remain as private. But just to be sure, check that your work has the private label as shown on the pic) More info on this in posts by @danielhassan
Create account in c9 and then select to create new workspace. There is basically 3 thing that you should make sure to get right when creating new workspace: Check that the workspace you are creating is private ( <- at the moment this is very important!!), clone from your newly created fork and last select ruby on rails template.
If you created your cloud9 account using github credentials you most likely should now have successfully cloned the RHC repo. Congratulations, you can skip rest of this topic.
If you didn't use your github credentials you most likely see some kind of cloning error in terminal window or it is asking password for ubuntu-user for github login. If later case just end the login pressing CTRL-c keys. Problem is that github doesn't have the ssh-keys of your ssh-client.
I was unable to get the ssh-agent working on the cloud9 instance. So, we need to use the ssh key we already have. Run following command in terminal cloud9 terminal window
Select the text that was printed on the terminal and copy it to clipboard by pressing CTRL-c. Now you can follow the instruction found from this page. Start from the step 4.
Once you have added the cloud9 ssh key to your github account run the following commands in cloud9 terminal
git fetch origin
git checkout develop
Configure upstream so that we can easily sync our fork in future
git remote add upstream https://github.com/dan-mi-sun/robinhood.git
Run following command on the cloud9 terminal
sudo apt-get install postgresql postgresql-contrib
Unfortunately you can access postgress configuration files only by using the terminal. So, using cloud9 terminal open the file /etc/postgresql/9.3/main/pg_hba.conf
sudo vim /etc/postgresql/9.3/main/pg_hba.conf
change the line
local all all peer
to this one
local all all md5
Once again using the cloud9 terminal start the database, create database user and database and make necessary adjustements using following commands
sudo service postgresql start
sudo su postgres
createuser -U postgres -P -d rh
When it asks for a password just enter password.
createdb -U rh robinhood_development
psql -U postgres -d robinhood_development
CREATE EXTENSION UNACCENT;
Using the cloud9 IDE create file config/database.yml and copy following as the files content
Setting up Rails
I try to maintain branch that follows the develop-branch and has all the necessary changes required to make this project work under cloud9. Get changes from my branch by running following commands on your cloud9-terminal
git checkout develop
git remote add polac https://github.com/polac/robinhood.git
git fetch polac
git merge polac/develop_c9
Before installing all dependencies we need to install nokogiri separately. Otherwise the cloud9 runs out of memory. After that we can install all other dependencies, setup the database and load some initial data.
gem install nokogiri -v '1.6.0'
Just click run project from the "Run Project"-button.