当我尝试安装redbox插件时,虽然一切都已安装,但最后一行表示找不到插件。那是为什么?
script/plugin install http://svn2.cvsdude.com/craigambrose/plugins/redbox
+ ./README
+ ./Rakefile
+ ./images/redbox_spinner.gif
+ ./init.rb
+ ./install.rb
+ ./javascripts/redbox.js
+ ./lib/redbox.rb
+ ./lib/redbox_helper.rb
+ ./stylesheets/redbox.css
+ ./tasks/redbox_tasks.rake
+ ./test/redbox_test.rb
Plugin not found: ["http://svn2.cvsdude.com/craigambrose/plugins/redbox"]
答案 0 :(得分:2)
vendor/plugins/redbox/install.rb
内的路径似乎有误:
plugins_dir = File.expand_path(".")
redbox_dir = File.join(plugins_dir, 'redbox')
root_dir = File.join(redbox_dir, '..', '..', '..')
File.copy File.join(redbox_dir, 'javascripts', 'redbox.js'), File.join(root_dir, 'public', 'javascripts', 'redbox.js')
File.copy File.join(redbox_dir, 'stylesheets', 'redbox.css'), File.join(root_dir, 'public', 'stylesheets', 'redbox.css')
File.copy File.join(redbox_dir, 'images', 'redbox_spinner.gif'), File.join(root_dir, 'public', 'images', 'redbox_spinner.gif')
redbox_dir
路径不考虑vendor/plugins
路径组件。但您可以通过手动将上面列出的三个文件从vendor/plugins/redbox
目录复制到应用程序public
目录下的相应子目录来自行完成安装。