fuubar: `require': cannot load such file -- fuubar (LoadError)

I honestly hope I am not missing something incredibly obvious, but no matter how hard I try, I cannot get RSpec to load Fuubar.

I installed it with gem install fuubar and ran rspec --format Fuubar --color spec in my project as per the README. That just results in this stack trace:

/Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:1108:in `require': cannot load such file -- fuubar (LoadError)
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:1108:in `rescue in custom_formatter'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:1105:in `custom_formatter'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:574:in `add_formatter'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `block in load_formatters_into'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `each'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:78:in `load_formatters_into'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/configuration_options.rb:28:in `configure'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:21:in `run'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'
    from /Users/JS/.rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun'

I am running MRI Ruby 2.0.0p247 and RSpec 2.14.8. I have tried using versions 1.2.1, 1.3.2 and 2.0.0.beta1 of Fuubar.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 15

Commits related to this issue

Most upvoted comments

@tay @bbugh The reason this is not working isn’t because of a problem with fuubar. It’s because fuubar is not in the Gemfile.

bundle exec rspec --format Fuubar --color spec

So when you run that command, it uses only the gems in the bundle. When it tries to load fuubar it can’t find it because of that fact.

Adding:

gem 'fuubar'

To the Gemfile solves the problem.