Ruby Gmail gem在Rspec-x27内部运行时出错;无法加载这样的文件——gmail/client';

Ruby Gmail gem在Rspec-x27内部运行时出错;无法加载这样的文件——gmail/client';,ruby,rspec,gem,rubygems,Ruby,Rspec,Gem,Rubygems,我正在使用这个名为gem的gem,它在一个简单的ruby脚本中运行时效果非常好。然而,当在Rspec中使用时,我不断地得到这个错误 Failure/Error: @gmailnew = Gmail.new() LoadError: cannot load such file -- gmail/client # /Library/Ruby/Gems/2.0.0/gems/gmail-0.6.0/lib/gmail.rb:50:in new' # ./temp.rb:7:inblock (2 le

我正在使用这个名为gem的gem,它在一个简单的ruby脚本中运行时效果非常好。然而,当在Rspec中使用时,我不断地得到这个错误

Failure/Error: @gmailnew = Gmail.new()
LoadError:
cannot load such file -- gmail/client
# /Library/Ruby/Gems/2.0.0/gems/gmail-0.6.0/lib/gmail.rb:50:in new' 
# ./temp.rb:7:inblock (2 levels) in '
知道这是什么原因吗

-我已经尝试重新安装它,因为它似乎找不到文件。

我无法找出冲突的原因,其他人也有类似的问题

我能够通过使用Bundler解决这个问题
1) 在Gemfile(gem'gmail')中添加了gem
2) $bundle install-这将在Gemfile内安装所有gem,并避免冲突
3) $bundle exec rspec my_spec_file.rb-执行rspec