This post assumes you have a working Ruby and Ruby Gems environment setup. Codeanywhere is an Ubuntu-based system, so if you need to, you can do a sudo apt-get install to install what you need. Also, the amount of gems that learn-co installs uses a lot of space, so you may not have a lot of extra space. The default container has a 2 GB limit. After you are sure Ruby Gems is working, install the Learn.co gem:

gem install learn-co

Then make the .netrc have the correct permissions:

chmod 600 ~/.netrc

Do an initial learn open command, this will create your folder for the project and the directories needed for learn-co to function. You will have to create a symbolic link since it creates it in the root of the home directory and not your workspace. Otherwise, it will not be accessible in your file manager. So you will need to go to ~/workspace and type the following:

ln -s ../code/

You may have to right click at the top of your Project and click refresh for the code directory to appear.

Next, we will be creating the domain or sub-domain that you own, go to:

Account Dashboard -> Custom Domains

Add a CNAME for the domain or subdomain to point to this in your DNS settings:

sfo.codeanyproxy.com

Decide on an external port that you want to type like this when testing your application:

devel.mydomain.com:portnum

And then decide on what port internaly you want to have that port forward to, since I am working on Sintara and using Shotgun, I picked port 9393 (the default for shotgun).

When running shotgun, you would have to tell it to run on server 0.0.0.0 instead of its default localhost or 127.0.0.1 . You would need to do something similar for rails or any other web frameworks or servers.

shotgun -o 0.0.0.0

That should be it, it may take a while for the DNS servers to update depending on the DNS server you use.