There are several topics that I need to address before I can fully answer your question; so please bear with me.
A little understanding
For your two examples, Heroku uses a number of different technologies to achieve the level of simplicity that it provides as a service platform. One of these technologies includes: Heroku's patented tool belt, which offers a set of command line tools & - allows developers to interact with their applications & - as well as interaction with many of the tools provided by Heroku, such as terminal access for various languages. The tool belt itself relies on two other technologies: Ruby and Git; which are supplied with the installation.
In a nutshell
Now that you create the Heroku application, you are actually creating the git repository in the Celedon Cedar runtime stack (by default); this repository is then added as a remote repo. This allows you to immediately launch git push heroku master . There is much more going on behind the scenes: for example, when you click, your commits are intercepted by the git pre-receive interceptor, which launches your application through the slug compiler and pre-packs it for distribution to the dyno collector; nevertheless I was distracted. For more information on more advanced topics, check out: https://devcenter.heroku.com/ ; there is a lot of information to read.
Stack
Now let me explain the cedar stack, as this is basically what your question is about. Cedar Celedon is one of many; however, this is the current default value (for many reasons). This polyglot runtime stack currently provides six web languages ββ(at the time of writing) running on Ubuntu (stable version 11.04, I suppose). All of these technologies run on top of the AWS EC2 computing environment.
So, to finally answer your question: you will need to install a suitable operating system, such as: Ubuntu; a set of languages ββsuch as: Ruby, Python, Node.js, etc. Git (for deployment), and the rest is up to you.
source share