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
    (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.


Anonymous said… global and other list ashley furniture [url=]ashley furniture[/url], calqsrh, allegiant air [url=]allegiant air[/url], odkrhto, pressure washers [url=]pressure washers[/url], 00579, dishnetwork [url=]dishnetwork[/url], wphtyf, adt security [url=]adt security[/url], dqqad,
Anonymous said… Hello good day [url=""]lexapro[/url] tels chuyen [url=""]synthroid side effects[/url] guevara blanchard [url=""]avodart[/url] smoking [url=""]allegra[/url] concise [url=""]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
Steve 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=]gucci shoes
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.
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.
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.
Unknown 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
Unknown 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
no matter what the pros and cons of installing gems. I love to install gems on my machines
celine said…

Popular posts from this blog

Unit/Functional Testing RubyAMF

One of my current projects is using RubyAMF to communicate with Flash ( On the whole this is really nice because it allows you to transfer Ruby objects directly to ActionScript ones (as opposed to translating the object into XML, sending the XML and then recreating the object in ActionScript). However, Rails does not provide a built in transport mechanism for AMF, so we cannot run functional testing directly on the data call (as we could for an XML or HTML transport layer). This is a show stopper for a lot of people (Rails w/o Unit testing = a big mess of trouble when something goes wrong). We can though serve both the HTML and the AMF formats depending on the request format. This means that we can test the object instantiation logic and make sure there are no errors in the controllers (though we cannot check the actual format of the data being served). In the controller, instead of rendering AMF alone, do the following respond_to do |format|

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,