Friday, April 8, 2011

While installing redbox plugin to rails why does it say Plugin not found ?

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"]
From stackoverflow
  • 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.

    Ram : Is this the correct approach ? I mean do I need to do this with all plugins or is this a problem with redbox ?
    jcrossley3 : 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.
    Ram : it works fine if the pwd is changed to vendor/plugin

0 comments:

Post a Comment