From: Phillip Gawlowski Date: 2011-07-19T07:43:12+09:00 Subject: Re: Question about Ruby Gems On Tue, Jul 19, 2011 at 12:17 AM, 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. Yes and no. RubyGems *can* be used to distribute gems that include C/++/Java/.NET extensions (Java and .NET for JRuby an IronRuby, respectively), but they don't *have* to. There's plenty of gems that are pure Ruby libraries, as well (I'm quite sure that the vast majority of libraries meets that, actually). > And if this is the case is there much of a difference between > using a gem like RMagick and just doing a system call: > >  system 'rmagick comand' > The difference is like using a single LEGO brick (farming out to the command line), or a couple of them to build something new (using the pg gem to access a PostgreSQL database, use the RMagick gem to generate a map with GPS data, and the Prawn gem to write a PDF). Sure, you can do all that from a command line, but that can be costly, brittle, or both. -- Phillip Gawlowski phgaw.posterous.com | twitter.com/phgaw | gplus.to/phgaw A method of solution is perfect if we can forsee from the start, and even prove, that following that method we shall attain our aim.               -- Leibniz