--JWOY2/vB4uO4FuME
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 19, 2011 at 07:17:52AM +0900, Tyrel R. wrote:
> Am I wrong in the understanding that the ruby gems that add
> functionality to ruby do it by wrapping c programs with ruby syntax
> somehow. And if this is the case is there much of a difference between
> using a gem like RMagick and just doing a system call:
>=20
>   system 'rmagick comand'

Ruby gems aren't about extending Ruby, per se. Instead, they are a way
for packaging and distributing libraries and extensions that allowing
for retrieving specific versions and their dependencies.

For example, if you write an app that requires the Ruby library
"farkle", then you can use the gem repository to retrieve the "official"
copy of farkle easily, install it in your local system and make use of
it. And those who use your application can also easily retrieve the
_same gem_, install it and have it available while using your app. All
without you having to worry about packaging up the "farkle" code and
getting it to the user.

And if you need a specific version of "farkle", gems allow you to
specify that version as well. So if you depend on an older version, you
can retrieve it in the same way you would the latest copy.

Hope that helps.

--=20
Darryl L. Pierce <mcpierce / gmail.com>
http://mcpierce.multiply.com/
"What do you care what people think, Mr. Feynman?"

--JWOY2/vB4uO4FuME
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4lk7EACgkQtddqM0QFuLLqlQCfefvfqgU6b1+uAIODZn1BVvpR
wqQAn1DAquUYNmlLfcSPGJPus6q+Alms
=eAIG
-----END PGP SIGNATURE-----

--JWOY2/vB4uO4FuME--

On Tue, Jul 19, 2011 at 07:17:52AM +0900, Tyrel R. wrote:
> Am I wrong in the understanding that the ruby gems that add
> functionality to ruby do it by wrapping c programs with ruby syntax
> somehow. And if this is the case is there much of a difference between
> using a gem like RMagick and just doing a system call:
>=20
>   system 'rmagick comand'

Ruby gems aren't about extending Ruby, per se. Instead, they are a way
for packaging and distributing libraries and extensions that allowing
for retrieving specific versions and their dependencies.

For example, if you write an app that requires the Ruby library
"farkle", then you can use the gem repository to retrieve the "official"
copy of farkle easily, install it in your local system and make use of
it. And those who use your application can also easily retrieve the
_same gem_, install it and have it available while using your app. All
without you having to worry about packaging up the "farkle" code and
getting it to the user.

And if you need a specific version of "farkle", gems allow you to
specify that version as well. So if you depend on an older version, you
can retrieve it in the same way you would the latest copy.

Hope that helps.

--=20
Darryl L. Pierce <mcpierce / gmail.com>
http://mcpierce.multiply.com/
"What do you care what people think, Mr. Feynman?"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4lk7EACgkQtddqM0QFuLLqlQCfefvfqgU6b1+uAIODZn1BVvpR
wqQAn1DAquUYNmlLfcSPGJPus6q+Alms
=eAIG
-----END PGP SIGNATURE-----