2012-03-26

My Rails Enviroment


If you have developed in rails, you probably love the language, but hate to set up the environment.
I know I do.

I've tried to use it in windows (it is hell) and linux (also not so good).
I thought the problem was just with me. My system is always with problems to run rails, and every time I had to work on something, I had a lot of work making it work again.

Finally a friend found a solution for that.
What he did is:
  • he created a virtualbox vm with ubuntu.
  • Installed ruby, gems, rails, etc
  • configured it to be accessible through ssh, and redirected to the port 3000
This sounds just perfect.
So all I had to do is to download this vm, install the editor I like(scite) and use it.
But it was made in a mac, with support to the x system, and windows doesn't have that.
Looking for that in a few blogs I found out about Xming, which is a software that allows you to run linux x applications on windows.

It was quite easy to set up and use.
  • Open putty
  • fill host name and port
  • click connection \ ssh \ X11
  • check Enable X11 forwarding
  • type :0.0 in x display location
like this:

after that you just have to open the file like this: scite index.html.haml
As you can see, the application looks different than a windows regular application, and that is because it is. This is running right from the vm, and the file being edited here is inside the vm.
I don't know about you guys, but to me, this is really impressive.

By the way, he wrote a post about it, and it is very nice to read if you want to know how to do it.
Here is the link for his page: Giorgenes' post about virtual ruby environment

Cheers!