How do you install Ruby on Rails plugins?
I am trying to install the has_calendar plugin, and it says that is successfully installing. However, when I have a page with code the plugin should execute, I am returned errors of undefined functions.
Is there somewhere I need to reference the plugin as a helper?
Here the sample code, straight off the wiki page.
<%= calendar :year =开发者_StackOverflow> 2010, :month => 9 %>
You need to be sure to restart your app after installing a plugin. You can do this by restarting the application server, or, if you're using passenger, touch tmp/restart.txt
.
You shouldn't need to add any references, unless the plugin's readme specifically asks for them.
You can ensure that the plugin is installed by checking the vendor/plugins/
directory to for a directory with your plugin's name. If it's not there, you may not have the proper SCM installed, which would be required to download the repository.
精彩评论