简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM