C9 Fix for Rails 5 After AWS Acquisition

Great post from a student that walked through the C9 fixes for Rails 5.1+:

I have hard time building environment in aws c9.

So I want you guys to have checklist building development environment follow up the course.

Right now, aws c9 has upper version of ruby and rails version comparing with this course.

So you have to downgrade the ruby, rails version to match the course environment version.

I highly recommend you guys to follow exact version of course

More than that, you have to install postgresql and initialize it to develop with postgresql.

1. check the postgresql in aws c9

I am wondering aws c9 does not support postgresql.

So we have to install it manually

follow up the instructions in below website

!! note that, aws c9 linux, they install postgresql9 version so

  sudo vim /var/lib/pgsql/data/pg_hba.conf

should be written like this in aws c9

  sudo vim /var/lib/pgsql9/data/pg_hba.conf

this instructions 

  sudo vim /var/lib/pgsql/data/postgresql.conf

should also be written like this in aws c9

  sudo vim /var/lib/pgsql9/data/postgresql.conf



2. Check the ruby version

 - You have to follow course's ruby version ( you can do this by rvm install 2.4.0)

 - When you install it, check (rvm list) to ensure that your setting is "ruby-2.4.0"

3. check the rails version

 - I'm not quite sure but there are some bugs over rails 5.0.6 [tzinfo issue maybe?]

 - follow up this instruction

 - "gem install rails -v 5.0.6" 

# you can install any version you like "gem install rails -v 5.x.x" 

# Recommend to follow exact version in udemy course.

 - So, the instruction will be like this "rails _5.x.x_ new devcampPortforlio -T --database=postgresql