ogeidix / yard-rails-plugin

MIT License
15 stars 6 forks source link

Removed Yard-Rails, still getting "[warn]: Error loading plugin 'yard-rails'" two times #1

Open jmuheim opened 11 years ago

jmuheim commented 11 years ago

I have removed yard-rails gem, but when running rspec, I'm getting 2 occurrences of [warn]: Error loading plugin 'yard-rails'.

I have searched the whole project but don't seem to be able to find the cause and remove it.

Any idea? Thank you.

jmuheim commented 11 years ago

After having removed the .yardoc file in the project's root, it's only displaying once now.

ogeidix commented 11 years ago

I have no idea. Unfortunately right now I don't have time to investigate it and I am not using the gem since 5 months.

limhoff-r7 commented 10 years ago

@jmuheim I had the same problem, but with 'yard-delegate': the issue was that although 'yard-delegate' was no longer in my Gemfile and bundle, it was still in my gemset. Make sure to gem uninstall yard-rails as yard looks for plugin gems using rubygems directly and that bypasses the bundle:

 # Load gem plugins if :load_plugins is true
    def self.load_gem_plugins
      return true unless options[:load_plugins]
      require 'rubygems'
      result = true
      Gem.source_index.find_name('').each do |gem|
        begin
          next true unless gem.name =~ YARD_PLUGIN_PREFIX
          load_plugin(gem.name)
        rescue Gem::LoadError => e
          tmp = load_plugin_failed(gem.name, e)
          result = tmp if !tmp
        end
      end
      result
    rescue LoadError
      log.debug "RubyGems is not present, skipping plugin loading"
      false
    end