class Heroku::Command::Plugins

manage plugins to the heroku gem

Public Instance Methods

index() click to toggle source

plugins

list installed plugins

# File lib/heroku/command/plugins.rb, line 12
def index
  ::Heroku::Plugin.list.each do |plugin|
    display plugin
  end
end
install() click to toggle source

plugins:install URL

install a plugin

# File lib/heroku/command/plugins.rb, line 22
def install
  plugin = Heroku::Plugin.new(args.shift)
  if plugin.install
    begin
      Heroku::Plugin.load_plugin(plugin.name)
    rescue Exception => ex
      installation_failed(plugin, ex.message)
    end
    display "#{plugin} installed"
  else
    error "Could not install #{plugin}. Please check the URL and try again"
  end
end
uninstall() click to toggle source

plugins:uninstall PLUGIN

uninstall a plugin

# File lib/heroku/command/plugins.rb, line 40
def uninstall
  plugin = Heroku::Plugin.new(args.shift)
  if plugin.uninstall
    display("#{plugin.name} uninstalled")
  else
    error(%Q{Plugin "#{plugin.name}" not found.})
  end
end

Protected Instance Methods

installation_failed(plugin, message) click to toggle source
# File lib/heroku/command/plugins.rb, line 51
      def installation_failed(plugin, message)
        plugin.uninstall
        error "Could not initialize #{plugin}: #{message}

Are you attempting to install a Rails plugin? If so, use the following:

Rails 2.x:
script/plugin install #{plugin.uri}

Rails 3.x:
rails plugin install #{plugin.uri}
"
      end