Skip to content

Instantly share code, notes, and snippets.

@ciprianna
Last active August 29, 2015 14:22
Show Gist options
  • Save ciprianna/05dffa83cda9b7a61a65 to your computer and use it in GitHub Desktop.
Save ciprianna/05dffa83cda9b7a61a65 to your computer and use it in GitHub Desktop.
Gems and APIs

Gems vs. APIs

Ruby Gems and APIs are both useful for expanding capabilities of a given program.

A Ruby Gem is a piece of code or files that a user has packaged for distribution and use for all other Ruby users. It serves a specific purpose (or related group of purposes) and is written by Ruby users. It can be continually updated and collaborated on. Gems are available on a public hub (Ruby Gems) for all Ruby users.

APIs are raw code output. They're the pure data without any wrapping/formatting of any kind. Programs build user interfaces on the APIs to make them user-friendly. This can be done using a gem, if someone has created a gem for this purpose. Gems don't require authentication or access, while APIs do, because APIs are often producing large amounts of data that's being used to run/build a program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment