Category Archives: Web

Hello Heroku!

After my last post I decided to tryout Heroku cloud and… I liked it very much! It’s easy, intuitive and very straightforward, giving you the control of your web application with a neat command line interface. Its client is developed in Ruby language so it runs pretty much anywhere. Its installation and usage is very clean. It is very nicely integrated with Git, so everything you do is controlled under a wonderful version control system. Believe me, it couldn’t be better for CLI-addicted web developers! ūüėČ

Ok, but what languages does this Heroku thing supports? That’s a great and easy question: it can support nearly any language. Heroku is designed using Buildpacks that is a layer to enable developers to add support for their preferred languages. there is reports of people having a great time running Java apps, Perl, and even Null! I personally use Heroku with Ruby (on Rails) and PHP.

But… how does it work? I mean, what about that-very-important-cloud-detail? Is it able to handle that-impossible-thing-that-almost-no-cloud-is? I’m no cloud specialist, but I’m pretty sure every detail you want to know is written in Heroku’s help pages. There is even a How it Works page with diagrams and animations for anyone to understand! ūüôā

So, I want to try it. What should I do?

  1. You need to install the Heroku client using Toolbelt. In my Ubuntu box I ran:

    wget -qO- | sh

  2. Now you need to… to… uh… I’m sorry, there is no second step. It is already installed. It is done. All you need to do now is use it: setup an account in, create an app with the heroku apps:create command and start coding, committing and pushing.

Well, that’s it. I’ve given you the very first basic steps to try Heroku and now you can move on to the Getting Started section. Choose your preferred language and start developing!

Happy coding!


I’ve been trying for some time to get into the Rails development but it’s been hard. Now I found Redmine, a very nice web tool for project management written in RoR, that might help me understand a little more about this framework.

First of all, my team at work moved from Trac 0.12 to Redmine 2.0.3. It was kinda hard to migrate the database but we did it. I needed to make a lot of changes in the migration script but we managed to move after all. I learned some small things about Rails, but nothing relevant.

After this event I decided to run my own instance of Redmine in one of my machines to manage at least one of my personal projects. Very few things have been done yet and I’m not sure where I’ll run it: in Heroku or Amazon EC2. I know Heroku has only 5MB of storage but it might save a day or two that I would need to spend installing MySQL+Apache+Passenger from scratch in a EC2 Micro instance.

Well, I’ll decide about that later. I hope this will keep me busy with Rails stuff and maybe inspire me to make or write something useful for you guys.

How to install Ruby on Rails on Linux

This might be the fourth time I have to install RoR in one of my machines and I struggle every time I have to. This post is to make me “not forget” how to install Ruby on Rails on Linux that doesn’t have the latest version of Rails packaged. The following steps have been executed on a 64-bit Debian Lenny machine.

So, the first step is to get the Ruby source code, compile and install. Easy “configure+make+makeinstall” task, starting from¬†its website. The version I downloaded was 1.9.2-p180.

$ wget 
$ tar -xzf ruby-1.9.2-p180.tar.gz 
$ cd ruby-1.9.2-p180 
$ RUBYDIR="/opt/ruby-1.9.2" 
$ ./configure --prefix="${RUBYDIR}" 

Ah! There is one additional step: you might also add some modules to the compilation, like “readline” and/or “openssl” (Heroku needs it) and for that you need to uncomment those lines in the “ext/Setup” file. After editing (or not) you can continue with:

$ make 
$ sudo install -d -o `id -u` "${RUBYDIR}" 
$ make install 

Set your PATH to include the Ruby binary directory (you might also set it in the “/etc/profile” file):

$ PATH="${RUBYDIR}/bin:${PATH}"

Some applications ask for specific modules like “readline” (Heroku needs it). For that you need to install it calling:

$ cd ext/readline 
$ ruby extconf.rb 

If you don’t see “creating Makefile” at the end of the log messages, the building won’t work. Install the needed packages (with “apt-get install libreadline5-dev”, for example) and re-run it. After that just “make+makeinstall”:

$ make 
$ make install 

Now let’s install Rails:

$ gem install rails 

You might also want to install some additional packages too, like “jquery-rails” and “heroku”:

$ gem install jquery-rails heroku 

Finally, fix the Ruby directory permissions:

# sudo chown -R root:root "${RUBYDIR}"