Forum: Ruby on Rails Gem as Plugin

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ayyanar A. (Guest)
on 2008-11-05 07:11
I have installed the fiveruns tuneup gem. I copied the five runs folder
from the gems directory
(C:\ruby\lib\ruby\gems\1.8\gems\fiveruns_tuneup-0.8.17)
to the application vendor directory.  When I restarted the server,
console shown the following error:


E:/Pavo/Insoshi/vendor/rails/activesupport/lib/active_support/dependencies.rb:116:in
`qualified_const_defined?':
"Plugins::FiverunsTuneup-0.8.17::Lib::Fiveruns" is not a valid constant
name! (NameError)
  from
E:/Pavo/Insoshi/vendor/rails/activesupport/lib/active_support/dependencies.rb:339:in
`new_constants_in'

Iam not sure what is the problem? Is it because I moved the gems to the
vendor folder? Generally how can we conver the gem as plugin?
Robert W. (Guest)
on 2008-11-05 16:50
> Iam not sure what is the problem? Is it because I moved the gems to the
> vendor folder? Generally how can we conver the gem as plugin?

If you are using the latest Rails 2.1.x then you want to look into gem
dependencies. Rails 2.1 has support for managing and freezing gem
dependencies. No need to roll your own solutions anymore.

Start by looking for the config.gem examples in your
config/environments.rb file.

Example:
config.gem "aws-s3", :lib => "aws/s3"

Then to "unpack" the configured gem into the vendors folder use:

rake gems:unpack GEM=aws-s3

Also take a look at all the other gems options you have by running:

rake -T gems

Ayyanar Aswathaman wrote:

> Iam not sure what is the problem? Is it because I moved the gems to the
> vendor folder? Generally how can we conver the gem as plugin?
This topic is locked and can not be replied to.