Testing your Ruby App in the cloud using a Cloud IDE
Why run your ruby code in the cloud?
Running code in the cloud and seeing the results is useful for a number of reasons.
- Collaboration. You can edit code and have someone else review and update it and teams can work on the same project in real time.
- Less clutter on your local machine. You can keep your local machine free of projects, and even free of programming languages using cloud IDEs. If you have a Chromebook or tablet you can still code by using the cloud.
- Testing. If you’re afraid you might break something on the local machine then just try it out in the cloud. No matter what happens you can just start from scratch. No harm done.
I’ve only looked at IDEs that allow you to run the code as an app in a browser, rather than a purely development only IDE. I’ve also focused on services with free options. As beginners, we’re more interested in testing and learning than paying a monthly fee for storage space or multiple apps.
This is one I hadn’t heard of before but I’m impressed by the list of languages and OSes to choose from.
The default interface is plain (white text on black background) but I like the fact that it’s easy to read and it's fast to navigate.
It was easy to start a new rails app and run the server, just as I would on a local machine.
At this point, I had to alter an unwieldy URL to include port 3000 so that I could view the app in a browser. In the end, it’s a minor inconvenience.
Getting a Rails framework setup is as simple as selecting the Rails container (on CentOS or Ubuntu).
For plain Ruby I think the only way is to setup a blank container (which runs on CentOS by default) and install
Ruby from the command line: sudo yum install ruby.
Then install Ruby gems: sudo yum install rubygems
And you can run the interactive Ruby console: irb
For beginners, Codeanywhere provides you with everything you’d need to test your code in the cloud. It's my pick for the best cloud IDE for Ruby web development.
- Windows, Mac, iPad, or any OS
- Can run File manager, Editor, Terminal
- Free version with no credit card required
- Can sudo for root
- Google assistant development in browser
- Supports floating window manager mode
If you're new to coding and want to learn Ruby, Replit is a great place to start. Replit is a great free online IDE that is perfect for creating projects with little to no setup required. The user interface is easy to use and I really enjoy it.
A free account gives you access to a user-friendly tool that needs no setup (love this). It includes autocomplete and free automatic hosting, making it the perfect choice for beginners.
Code Ruby online from your browser in collaboration with others, compiling and running your code to share and deploy your applications.
Replit is fast becoming the cloud IDE top choice for new and seasoned developers
This is probably the cloud IDE that I’ve used most. Cloud9 employs a really simple interface for setting up Workspaces (or containers for your coding language). Everything is laid out neatly and clearly. The site offers the following many templates such as Custom, Node.js, Ruby, Ruby on Rails Tutorial, and even WordPress to get you started.
Selecting a workspace and then giving it a name will bring you to the loading screen, which can take some time to complete. Once the loading screen disappears you can access the IDE. The Custom template already includes Ruby while the Ruby on Rails app is simple to setup.
There’s a good community built into the website and the documentation is extensive.
Cloud9 offers apparently unlimited free public workspaces (sort of like the GitHub model). The Individual plan is $19/month for unlimited private workspaces and better performance.
The very slow loading time for the free workspace is a bit annoying but once connected it’s a fast user experience.
I really like the interface on Cloud9 and it's designed to be versatile and efficient.
Koding’s approach to logging in is unique in that it asks you for a team name and email address. The team name is due to the collaboration type environment that Koding is trying to promote. Koding for teams is the motto.
I used RubyBeginner.koding.com as the URL for accessing my ‘team’ account.
The interface is slick and easy to understand. You’re first presented with options to configure a stack for use among your team, Slack for collaboration, and a command line program for use with a local IDE.
I tried skipping these by ended up stuck. Unable to configure a stack due to lack of options and guidance.
I returned to the main URL and tried again. This time, under Stacks I was presented with some options for configuring my cloud provider. Koding works differently to Cloud9 and CodeAnwhere in that you need to set up an Amazon Web Services account to use the cloud IDE. This isn’t too complicated, although personally I find Amazon’s Web Services to be purposely obscure and designed to lure you into spending money with them on a monthly basis, whether you want that or not.
So after about 5 minutes I was able to get into the IDE and start playing around.
To use Rails I had to run the ruby apt-get install ruby-railties-4.0 package, but at least the IDE told me this. On first try this failed due to some internal error. I tried reinstalling ruby, then an older version of rails with the —fix-missing parameter but this also failed.
Searching on the internet for help on this I saw that many other people had the same issue. Solutions hinted at editing files in the /etc folder. I’m fairly competent on Linux but this is a beginner blog and I am really looking for the simplest ways of coding in the cloud. Reconfiguring a Linux server is not what this evaluation is about.
Koding’s interface is very nice and it’s probably a great piece of software. Maybe they don’t want hobbyists and beginners using the IDE. I’ll leave this one for another day.
There are other cloud IDEs but many don’t support Ruby. The website URLs and branding seem to change often, and in this highly competitive market there’s a high attrition rate with new offerings. Considering we want to keep things free these are my recommendations:
If you want a really good looking IDE, don’t plan to spend more than 50 hours a month on one project at a time then go for nitrous.io
For an overall easy-to-use experience with a nice interface, I recommend Codeanywhere.
If you have experience with any other IDEs please let me know. What's your favorite and why?
Yoshioka Tsuneo says
We just released PaizaCloud Cloud IDE.
PaizaCloud Cloud IDE is flexible browser-based web development environment.
It support floating window manager mode, root access to install packages, running/detecting servers on most ports, or adding, or creating plug-in apps using HTML.
I just hope you to check it out.
Lincoln J Peterson says
I tried replit but my school blocked it, and all the others simply don’t work. Are there any other ide’s that I can use?