我试图在我的Ruby on Rails 3应用程序中遵循此tutorial到AJAXfy文件上传。在“步骤6.使用iframes和responds_to_parent”一章中,我必须安装'responds_to_parent'插件,但我无法使用。
我使用运行“Snow Leopard”的Mac OS,所以在我的终端我输入:
script/plugin install http://responds-to-parent.googlecode.com/svn/trunk/
但回复是:
-bash: script/plugin: No such file or directory
我必须输入什么?
答案 0 :(得分:1)
script/plugin install
已不在铁轨中。请改用此语法:
rails plugin install
随着Rails 3的发布,脚本目录中的所有可执行文件都被合并到script/rails
。
就部署而言,使用rails plugin install
会将代码添加到/ vendor / plugins目录中,因此只要您将其检入源代码管理系统,就应该使用其余代码进行部署。 Gems应该包含在Gemfile中。您将需要使用“bundle install --deployment”。如果您使用的是capistrano,则捆绑包中会附带一个配方。有关bundler的更多信息,请访问:http://gembundler.com/