Friday, October 24, 2008

Freezing Gems

What is a gem and why would you want to freeze it?

In Ruby, there are times when you want to access pieces of functionality that other people of written (3rd party libraries) and you normally have 2 options. You can install a plug in or install a gem. Normally the method you use is determined by which ever is made available by the author.

Gems are installed on the host machine and are pretty handy when you want to run things in the command line or else across lots of projects, but their downside is that if you use a gem in a Rails project there is no automatic publishing mechanism when you deploy your site. You will need to log onto the remote host machine and install the gem manually.

Plugins are specific to Rails and are similar to gems in that they are also 3rd party libraries. However they are associated with your Rails project as opposed to your machine so they will get posted to the server on a regular deploy.

Freezing a gem is the process of transforming a gem into a plug in. Essentially the gem is "unwrapped" and installed into your Rails plug ins directory.
  1. Make sure the gem you want to freeze is installed.
  2. Navigate to your Rails project's home directory and type the following
  3. script/plugin install http://svn.ardes.com/rails_plugins/gems
    (this is the plugin which will freeze the gem)
  4. rake gems:freeze GEM=gem_name
Note that not every gem can be frozen successfully. Some gems rely on executables which are platform specific and these cannot be accessed from the plugins directory.

30 comments:

Anonymous said...

http://markonzo.edu global and other list ashley furniture [url=http://jguru.com/guru/viewbio.jsp?EID=1536072]ashley furniture[/url], calqsrh, allegiant air [url=http://jguru.com/guru/viewbio.jsp?EID=1536075]allegiant air[/url], odkrhto, pressure washers [url=http://jguru.com/guru/viewbio.jsp?EID=1536078]pressure washers[/url], 00579, dishnetwork [url=http://jguru.com/guru/viewbio.jsp?EID=1536080]dishnetwork[/url], wphtyf, adt security [url=http://jguru.com/guru/viewbio.jsp?EID=1536076]adt security[/url], dqqad,

Anonymous said...

http://lumerkoz.edu Hello good day [url="http://barborazychova.com/members/Buy-Lexapro.aspx"]lexapro[/url] tels chuyen [url="http://rc8forum.com/members/Buy-Synthroid.aspx"]synthroid side effects[/url] guevara blanchard [url="http://soundcloud.com/avodart"]avodart[/url] smoking [url="http://soundcloud.com/buy-allegra"]allegra[/url] concise [url="http://www.sqlprof.com/members/Buy-Inderal.aspx"]inderal side effects[/url] biogene

Cris said...

This information is very interesting, I really enjoyed, I would like get more information about this, because is very beautiful, thanks for sharing! costa rica investment opportunities

niz said...

Hello .. firstly I would like to send greetings to all readers. After this, I recognize the content so interesting about this article. For me personally I liked all the information. I would like to know of cases like this more often. In my personal experience I might mention a book called Generic Viagra in this book that I mentioned have very interesting topics, and also you have much to do with the main theme of this article.

Anonymous said...

werb nxuuf Free Porn crhzrp v yk z fit

Anonymous said...

Wow man keep it up



[url=http://www.venditascarpe.com/]gucci shoes
[/url]

Anonymous said...

I agree with the post above and I will find more information from google.

Anonymous said...

uoow sllvk free sex szdpzbv g zm s aaw

Networking solutions said...

There are may person searching about that now they will find enough resources by your post,

ファロム said...

Hi there,
Really nice job,There are many people searching about that now they will find enough sources by your tips.
Also looking forward for more tips about that

Mobile Computing said...

Wow, Great post,Nice work, I would like to read your blog every day Thanks

Seo Services India said...

Això és realment interessant, ets un blogger molt hàbil. M'he unit a la seva alimentació i esperem que busquen més del seu missatge meravellós. A més, he compartit el seu lloc en els meus xarxes socials !

cheap auto insurance said...

Gems are as similar as the plugins.I used one some days ago and they are really handy.

Austin Mortgage said...

I just wanted to thank you again, amazing site, where you have developed. It is for those who are actually interested in this particular topic, especially this post useful skills. Do you really all so sweet and considerate with others, plus read your blog post is a fantastic joy

jugan said...

This is so cool. I am such a huge fan of their work. I really am impressed with how much you have worked to make this website so enjoyable.
wound care

Dissertation Help said...

Never heared about this technique freezing gems. Looks amazing. Let me try it also.

medical supplies said...

I feel delighted to read such a good post. The author has done a great job in sharing this great piece of news with us through this blog. Thanks. Keep up the good work.

Home Security said...

The postings are very unique and also out standing performance with the new creativity and excellency with the new different ideas and concepts.Really I am waiting for some more new posts from you.Keep up your excellency and efficiency in this same levels

Home Security

Dissertation said...

Thanks for this I have been searching for freezing gems information dissertation help

Dissertation said...

That is great! love to read about gems. Great shared. Thanks alot essay help.

Houston Home Security said...

I really like your writing. Thanks so much, finally a decent website with good information in it.

Atlanta Home Security said...

I'm impressed. You're truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. I'm saving this for future use.

foley catheter said...

I really don't have words to describe how much I liked this article of yours. The author really know his job well. Thanks for this wonderful share.

home security monitoring said...

Your blog article is very interesting and fanatic, at the same time the blog theme is unique and perfect, great job. To your success, one of the more impressive blogs I've seen. Thanks so much for keeping the internet classy for a change.

Atlanta Alarm Monitoring

home security monitoring said...

Your blog article is very interesting and fanatic, at the same time the blog theme is unique and perfect, great job. To your success, one of the more impressive blogs I've seen. Thanks so much for keeping the internet classy for a change.

Atlanta Alarm Monitoring

aquacel said...

Fantastic post indeed. Thanks to the author for this great share. Looking forward for more quality stuff. Thanks again.

hanumant said...

I actually enjoyed reading through this posting.Many thanks.

Dissertations Help

hanumant said...

I actually enjoyed reading through this posting.Many thanks.

Dissertations Help

Writing research essays said...

no matter what the pros and cons of installing gems. I love to install gems on my machines

celine said...

good