For my very first installation I’ve ever made of Ruby and Ruby on Rails I’ve used MacPorts. But doing it this way was not so satisfying. Than I stumbled upon RVM and finally found what I was looking for. From the RVM homepage:

“RVM is a command line tool which allows us to easily install, manage and work with multiple ruby environments from interpreters to sets of gems.
[...]
RVM allows users to deploy each project with its own completely self-contained and dedicated environment–from the specific version of ruby all the way down to the precise set of required gems to run the application.
[...]
RVM reduces the complexity that is the many facets of ruby development through its command line API. RVM allows you to have **identical** self-contained environments in your Development, CI, Q/A, Staging, and Production environments.”

Great! :)

So here’s how I set up my RoR playground on my Mac OS X 10.6.8.

Open Terminal or iTerm and digit as follows

kevin$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

than close your terminal and open your

~/.bash_profile

file. If it does not exist, create it and add at the end the following line

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

Now open your console and check whether the installation was successfully performed

kevin$ type rvm | head -n1

It’s good practice to update to the head version of RVM. I tried using the update command but it seems it does not exist anymore.

kevin$ rvm update --head
ERROR: rvm update has been removed. See 'rvm get' and rvm 'rubygems' CLI API instead

so I used the get command instead

kevin$ rvm get head

and it worked.

Rails 3 requires at least Ruby 1.8.7 but seems to work best with the 1.9.2 one. Let’s install both versions so we can switch from one to the other and back.

kevin$ rvm install 1.8.7
kevin$ rvm install 1.9.2

Both will require some secs.

Now let’s use a version of Ruby and set it as the default, passing it the –default option

kevin$ rvm use 1.9.2 --default
Using /Users/kevin/.rvm/gems/ruby-1.9.2-p180

Next create a gemset, which will make available different gems for different versions

kevin$ rvm gemset create rails3
'rails3' gemset created (/Users/kevin/.rvm/gems/ruby-1.9.2-p180@rails3).

Now let’s get ready to install some Ruby gems using RubyGems. Since Rails is distributed as a gem, we will use RubyGems to install it. Download RubyGems, unpack it and then from the rubygems directory run

kevin$ ruby setup.rb

This will install RubyGems. Before going on, update it using

kevin$ gem update –system

kevin$ gem install rails -v=3.0.1

or

kevin$ gem install rails --version 3.0.1

To check gem installation execute

kevin$ which gem
/Users/kevin/.rvm/rubies/ruby-1.9.2-p180/bin/gem

Set a default rvm and default gemset

kevin$ rvm use 1.9.2@rails3 --default
Using /Users/kevin/.rvm/gems/ruby-1.9.2-p180 with gemset rails3

Let’s check the consistency of the installed versions of Ruby and Rails:

kevin$ ruby --version
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.8.0]
kevin$ rails --version
Rails 3.0.1

Now we are ready to start playing with our RoR environment.


Y’all want a .doc

Or a .odf. Or something similar. It doesn’t matter, make your choice. But remember, give me a document file.

Well, what follows is something I’ve never thought I could have ever written. But you never know and life could be so surprising..

2011. I really don’t think you need me to say that every IT (actually not only the IT ones, but let’s keep it simple..) enterprise has understood that information is value for the whole company. And value for the company means, in some way or other, money. You don’t have to be Facebook to understand it. But most of all information sharing among the whole company’s levels, both horizontally and vertically, is what drives value. Sharing means that the information is not mine, is not yours, rather it’s ours. Sharig means collaborate, what you do not know may be what I know or better what you know and what I know may help one another to solve its problem. Just hot water until now.

Now the great question: how do you collect and share information inside a company? First of all you need culture. Then you have to help it with tools. Let’s suppose you already have the culture..you lucky! So you need a tool. Which tool comes first into your mind to easily and freely collect and share information and collaborate on it? Microsoft Word, it’s so simple!! .doc filses have been created just for easy sharing and collaboration, wasn’t them? Having n people collaborating all togehter at the same time on a single doc is so damn simple. You can tag documents, you can organize them inside directories, you can interlink them and most of all you can easily track who wrote what, why and when. And believe it or not, it’s just two-clicks far from you. Word documents are so easy to be indexed and to search on thanks to Windows search or some very powerful tools like Google’s Search Appliace or whatever. You buy it, set it up, configure it and it works! And if Microsoft Office licences are too expensive for you, well install OpenOffice instead. It’s simple, again.

Wiki, who really needs it when you may have loads of .doc (or .odf) files to maintain?


Today one of the major Italian hosting company had a down of 4/6 hours. This’s not a news, even Google and Amazon experienced some problems in the past. The news is that there were a fire (caused by some UPS) on their unique data center serving all their customers and even themselves!

In order to communicate with the customers, they have setup a twitter account (http://twitter.com/#!/Arubait) that in one day has more than 6k followers.

My first thought is that (as @Felter said on his tweet) burning your server farm and setup a new twitter account to get 6k followers in a day is not a bad idea :) .

After a little I feel a bit frustrated of all the time spent on customers trying to make them spend a little more on a hosting platform that is reliable and have some sort of SLA instead of watching only the money. All customers blaming Aruba for what happened must instead blame themselves. They know that Aruba offer a cheap hosting with almost no SLA, but they are so convenient….

In my opinion, entrust a company that didn’t replicate even DNS servers on multiple datacenter is simply not an option for your business. How much time/money can you afford to lose for a down on your IT infrastructure? Is the money saved worth the risks taken?

In 2011 I think that cloud solutions, I mean any cloud solutions (Amazon, Rackspace etc), are better than this kind of hosting. They costs a little more but have SLA! And most important all data is replicated across more than one datacenter. An UPS battery causing a fire is their business, not mine!

So the real question is: how much are you ready to pay to ensure that your business doesn’t depend on a overheating Chinese UPS?


My little EC2 instance runs with CentOS. In these days I need to set up my own version control system but I’m tired of using the same old Subversion…so, why not taking the chance to try “the fast version control system”: Git.

Here’s a quick installation guide:

0. Prerequisites: execute a yum update and then install GCC if not already installed

sudo yum -y update
sudo yum install gcc

1. Dependencies: install the needed dependencies and the module to add the additional target to the Makefile generated by ExtUtils::MakeMaker

yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel perl
sudo yum install perl-ExtUtils-MakeMaker-Coverage.noarch
sudo yum install perl-ExtUtils-MakeMaker

2. Download: download the tar and extract the files

wget http://kernel.org/pub/software/scm/git/git-1.7.4.1.tar.gz
tar -zxvf git-1.7.3.tar.gz

3. Build and install

./configure
make
make install

That’s all!


A new software to make your own tablet or pc as a “Minority report device”.

http://thetechjournal.com/electronics/android/eyesight-gesture-recognition-technology.xhtml


Are you the next Mario?

Improve and improve…

http://www.joystiq.com/2010/11/28/kinect-hacked-into-super-mario-bros-emulator-controller/


After many “awards” now there’s a concrete possibility to use “Kinect” not just for games…

Here you are…

http://www.windows7news.com/2010/11/27/kinect-controlling-windows-7/

See you on “Enterprise”.


Licensing in the cloud

Migrating to the cloud may seem to be easy and exciting. But you should not forget that is not all fun and games and there may be some (not so) hidden hurdles to clear before starting.

One of these is for sure software licensing. This is a not so technical issue and for technical people like me is easy to forget about it. The problem is simple: traditional licensing may not be enough or may not fit the cloud. Numbers of CPUs, maximum number of users, validation through licensing servers are only a few examples and may easily become problems when moving to the cloud.

Anyway the good news is that thanks to the increasing interest on the cloud, more and more companies are releasing software having cloud-friendly licensing. But licensing in the cloud is something new for many people as it may be very different from the traditional one. So the question is what kind of licenses may we have on the cloud. Just to start thinking about this issue and to try giving an answer to the question, I found the post “Cloud Licensing Models That Exist Today” from AWS Blog interesting.


Beauty and pain of TDD

When you like something, whatever it could be, it’s easier and natural for everyone to point out the beauty as well as the pros and the benefits. Cons, issues and pains are often left behind. But in some cases (or maybe always, who knows..) such an information is not enough to have a clear 360° view on the thing. It’s always the same old story, what may be good for you may not be as good for me.

As everything else in this world, TDD has not only pros and benefits. But googling around it’s easier to find most of all enthusiatic thoughts on it. Well, by chance I found someone using it and giving a clear and objective criticism towards TDD. What I really like is that this criticism is not an end in itself, but wants to help people to figure out what does using TDD means and to understand if it is the right choice or not.

Have a nice read: Test driven development at Transloadit.


Is it so hard to make employees happy?

“Google Inc.’s decision to give all of its 23,300 employees a 10% pay raise next year — and a $1,000 bonus to boot — is just the latest volley in what has become a full-fledged war for top Silicon Valley talent.” Read the full story here: http://www.latimes.com/business/la-fi-silicon-pay-war-20101111,0,5173884.story


Powered by WordPress and theme PlainMagic.
Copyright © 2010 The Granma's garage