All, I''ve downloaded and installed a plugin into my vendor directory. How do I then take advantage of it? It has an init.rb file which has the appropriate require. What do I need to do to make sure that the plugin code gets loaded? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
If the plugin is placed in your vendor/plugins directory, it will be loaded automatically, i.e. the plugin should be in vendor/plugins/<plugin>, with the init.rb file at vendor/plugins/<plugin>/init.rb. james On 7/5/06, Wes Gamble <weyus@att.net> wrote:> All, > > I''ve downloaded and installed a plugin into my vendor directory. How do > I then take advantage of it? > > It has an init.rb file which has the appropriate require. > > What do I need to do to make sure that the plugin code gets loaded? > > Thanks, > Wes > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- * J * ~
Josh Knowles
2006-Jul-05 22:44 UTC
[Rails] PLUGIN newbie: How do I use an installed plugin
On 7/5/06, Wes Gamble <weyus@att.net> wrote:> > All, > > I''ve downloaded and installed a plugin into my vendor directory. How do > I then take advantage of it? > > It has an init.rb file which has the appropriate require. > > What do I need to do to make sure that the plugin code gets loaded?As long as the plugin is in vendor/plugins then its init.rb will automatically be called when your application is loaded, there are no additional steps needed. Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060705/0ab8c389/attachment.html
Wes Gamble
2006-Jul-05 22:53 UTC
[Rails] Re: PLUGIN newbie: How do I use an installed plugin
James Adam wrote:> If the plugin is placed in your vendor/plugins directory, it will be > loaded automatically, i.e. the plugin should be in > vendor/plugins/<plugin>, with the init.rb file at > vendor/plugins/<plugin>/init.rb. > > jamesI am trying to use the "fix_date" plugin. The plugin is in my vendor/plugins directory. The init.rb file is in vendor/plugins/fix_date/init.rb. Here are the contents of init.rb: # Include hook code here require ''fix_date'' There is a fix_date.rb file in vendor/plugins/lib. However, I am unable to access the new functionality provided by the plugin (incidentally, this plugin modifies ActionView::Helpers::DateHelper to change the select_date and select_hour methods). How, exactly, is it "loaded automatically"? I''ve restarted my app. twice and I see no change in the select_hour method. All of the examples I can find seem to have to do with plugins that need to be "called" by file name in an ActiveRecord descendant. Is there something else that I need to do in order to access the plugin methods? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
Seemingly Similar Threads
- text_field doesn''t call overridden ActiveRecord getters
- Wrap error_messages_for() call when no instance var present
- Best way to organize non-controller logic???
- rake migrate VERSION=0 doesn''t appear to execute
- Best Practices: Splitting the "view model" from AR model