Ruby dependency problem during gems installation

When I try to install ruby gems. It always shows the following error…
ERROR: Error installing net-ldap:
net-ldap requires Ruby version >= 2.0.0.

I am trying to install on ubuntu 14.04.1 LTS. And it always install default version of ruby i.e 1.9.1.
So I am getting this error.

And also it gives the following error

Error executing rake="/usr/bin/rake" gem install --no-ri --no-rdoc nokogiri json rack sinatra thin memcache-client zendesk_api sqlite3 sequel amazon-ec2 uuidtools curb net-ldap builder trollop parse-cron ox mysql softlayer_api configparser azure

I couldn’t understand why these error are giving?

How to resolve these issues?

Please help.
Thanks in advance.