If you want to unpack gem file - you can only unpack gems that you have installed, for example memcache-client:
gem unpack memcache-client
You may also use rake:
rake gems:unpack GEM=memcache-client
But some reason, the second does not work for my msysgit.
And, there is a discussion to use gem or plugin (http://www.robbyonrails.com/articles/2009/01/13/question-plugins-or-gems-or-both)
Showing posts with label gem. Show all posts
Showing posts with label gem. Show all posts
Thursday, February 25, 2010
Monday, February 22, 2010
Rails plugins and gems
In each rails project, there is a folder named gems and plugins. They are lib files needed for the project. You can install a gem or a plugin into plugins folder. For example, if you want to install will-paginate, you can run the following in the command prompt windows. Then, your rails will recognize the gem:
$ gem install will_paginate
Successfully installed will_paginate-2.3.12
1 gem installed
Installing ri documentation for will_paginate-2.3.12...
Installing RDoc documentation for will_paginate-2.3.12...
However, when you share this lib of the project with others, others need to install the gem. But, if you put the lib into your project, others do not need to install the gem. Therefore, since rails 2.1, you can put the lib into the plugins folder with the follwing command:
$ ./script/plugin install git://github.com/mislav/will_paginate.git
Then, you can find the lib folder as follows: your_project/Vendor/plugins/will_paginate
$ gem install will_paginate
Successfully installed will_paginate-2.3.12
1 gem installed
Installing ri documentation for will_paginate-2.3.12...
Installing RDoc documentation for will_paginate-2.3.12...
However, when you share this lib of the project with others, others need to install the gem. But, if you put the lib into your project, others do not need to install the gem. Therefore, since rails 2.1, you can put the lib into the plugins folder with the follwing command:
$ ./script/plugin install git://github.com/mislav/will_paginate.git
Then, you can find the lib folder as follows: your_project/Vendor/plugins/will_paginate
Labels:
gem,
gem and plugin,
gem vs plugin,
install plugin,
plugin,
rails
Subscribe to:
Posts (Atom)