Last Updated: February 25, 2016
·
318
· janncm

Some basic Ruby concepts.

I was facing some problems with basic concepts through my way from Java, C to Ruby, then I decided to make it easier to someone else.

gems - They are the way Ruby libraries are package, like .jar to Java. Inside a gem you find Ruby code (.rb), gemspec and tests.

Rubygems - Package manager for gems. Used to install and manage gems. You might compare it like Maven for Java.

Gemfile - File in which you define the gems you gonna need in your project, it is used by Rubygems to install those gems. Something like Maven Pom.xml but much more simple.

Bundler - Its a Ruby gem that makes managing gems easier. It tracks and installs the exact gems and versions that are needed automatically based on your Gemfile and searchs on Rubygems' repo. You may think its like a Maven but more intelligent, still using Maven's Repo.

RVM - Is a tool to install and manage versions of Ruby, makes easier to change between Ruby versions. Whould be like managing JVM versions, there are some projects trying to do the same, still I don't know anything like RVM for Java.

Gemset - Set of gems, it's like a library in Java, it encapsulates gems to be used in specific context.

P.S. This is just some tips that helped me, everybody has a particular way to easily understand things. Please, be welcome to correct and improve it.