Skip to main content

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.

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
Anonymous said…
werb nxuuf Free Porn crhzrp v yk z fit
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
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
Wow, Great post,Nice work, I would like to read your blog every day Thanks
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 !
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
Never heared about this technique freezing gems. Looks amazing. Let me try it also.
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.
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.
I really like your writing. Thanks so much, finally a decent website with good information in it.
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.
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
no matter what the pros and cons of installing gems. I love to install gems on my machines

Popular posts from this blog

Master of my domain

Hi All, I just got myself a new domain ( http://www.skuunk.com ). The reason is that Blogspot.com is offering cheap domain via GoDaddy.com and I thought after having this nickname for nigh on 10 years it was time to buy the domain before someone else did (also I read somewhere that using blogspot.com in your domain is the equivalent of an aol.com or hotmail.com email address...shudder...). Of course I forgot that I would have to re-register my blog everywhere (which is taking ages) not to mention set up all my stats stuff again. *sigh*. It's a blogger's life... In any case, don't forget to bookmark the new address and to vote me up on Technorati !

Responsive Web Design

I wanted to go over Responsive Web Design using CSS. In the old days of web development, we had to code to common screen sizes (i.e. 800 X 600, 1024 X 768) and we patiently waited for people to upgrade their computers to have a decent amount of screen real estate so we could design things the way we really wanted. We also took on semi stretchy web layouts etc to expand and contract appropriately. Then about 2 or 3 years ago, Apple released this little device called an iPhone with a 320 X 480 resolution which took the world by storm and suddenly a lot of people were viewing your website on a tiny screen again... Anyways, as it can be difficult to design a site which looks good on 320 X 480 AND 1680 X 1050, we need to come up with some kind of solution. One way is to sniff the client and then use an appropriate stylesheet, but then you are mixing CSS with either JavaScript or server side programming and also potentially maintaining a list of appropriate clients and stylesheets. Also, you

jQuery: When does a library become a language?

jQuery is a great JavaScript library which allows web developers to write cross platform code, but some of its syntax looks like it is based more on Ruby than JavaScript. When does a library become a language? So first of all, what is the difference betwen a programming library and a programming language? A programming language is a means by which we (as humans) can give instructions to a computer to get it to do various tasks (algorithms, computations, etc...). They are largely artificial constructs created for human readability which then need to be compiled or interpreted into actual instructions which the computer can then carry out. A compiler turns a program into machine readable instructions ahead of time (compile time) where as an interpreter does so on the fly (runtime). Languages such as C and Java are generally compiled and JavaScript, Perl and Ruby are generally interpreted. While there is no real reason why this has to be the case, these factors normally affect the syntax