ducktyped
ducktyped

Reputation: 4498

Ruby "no such file to load" error running spec from rake task

I have written tests using rspec. When I run default rake task by running

bundle exec rake spec

it gives following error, even though previously it used to work fine.

`require': no such file to load -- sinatra/base (LoadError)

but if I run tests using simple

ruby spec/humongous_spec.rb

It runs perfectly fine. I don't what is wrong with this.

Upvotes: 0

Views: 782

Answers (1)

djd
djd

Reputation: 1001

Add this line to your Rakefile

require 'bundler/setup'
Bundler.require

Upvotes: 1

Related Questions