So I’ve been using Nitrous.io for the past year or so as my online IDE and have absolutely loved it. Sadly, the company is shutting it’s doors for good on November 14th. I’ve been working on an application for my company (I am not a professional developer here, just saw an opportunity for custom software to solve an issue we’ve been suffering) and obviously needed to transfer everything to a new IDE.
I’m going to detail all of the steps I went through in case it can help others out there wondering what to do.
I decided to use Cloud9 as their free plan seems to include everything I need for now. After signing up for an account it’s time to clone my application from GitHub. First I copied the link to clone my repository:
After signing in to Cloud9, create a new workspace and then enter in all of the relevant information. You’ll paste your GitHub text into the box labeled “Clone from Git”, click on the “Ruby” template, then “create workspace”:
We now need to make sure we’re using the same version of ruby and rails as our application was originally using. I had stored all of this data in my applications README.rdoc file when I first began creating the application. I see that I have ruby version 2.3.1 but that is not the version Cloud9 is using by default (default is ruby v 2.3.0). Luckily rvm is baked into the IDE and so we can use the following commands in the command line to get to the right ruby version running:
$ rvm install ruby-2.3.1
$ rvm use 2.3
$ rvm use 2.3.1
We can then verify that we’re using the correct version by typing:
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Now we just need to get rails set up and running. We’ll start by installing bundler:
$ gem install bundler
Next we’ll install all of our app’s gems, including the correct version of rails:
To ensure we’ve got rails up and running type:
$ rails -v
So we’re good to go.
Now we just need to get our database up and running again so in the command line type:
You should now be able to use all of your git commands to keep your repository up to date.
Next I just needed to make sure that I could push to my production app which is hosted on Heroku. First I signed into my Heroku account in the command shell:
Password (typing will be hidden):
To make sure I could push to my heroku app I entered:
$ git remote add heroku email@example.com:yourproject.git
In the above
yourproject is that name of a specific project you have on heroku.
You may also have to enter:
After this you should be able to use all of your heroku commands within Cloud9 and be back to work on your application.
Hope this information helps anyone facing the same problems I was earlier this week.