views:

675

answers:

1

When I try to install redbox plugin although everything gets installed, a last line says plugin not found. Why is that ?

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"]
+2  A: 

The paths inside vendor/plugins/redbox/install.rb appear to be wrong:

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')

The redbox_dir path isn't accounting for the vendor/plugins path components. But you can complete the installation yourself by manually copying the three files listed above from the vendor/plugins/redbox directory to the appropriate subdirectories beneath your app's public directory.

jcrossley3
Is this the correct approach ? I mean do I need to do this with all plugins or is this a problem with redbox ?
Ram
It's only a problem with redbox, but in general, any time you see "Plugin not found", check the plugin's install.rb file to see if you can determine the "real" error.
jcrossley3
it works fine if the pwd is changed to vendor/plugin
Ram