gmailgem / gmail

A Rubyesque interface to Gmail, with all the tools you'll need.
Other
397 stars 119 forks source link

LoadError: cannot load such file -- gmail/client when run inside rspec #192

Closed ibaralf closed 4 years ago

ibaralf commented 9 years ago

This is most likely some setup issue. When I run the Gmail.connect inside a spec file (Rspec), I get this error. Everything works fine when just running as a plain ruby script withput any Rspec parts (e.g. > ruby temp.rb).

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:in`block (2 levels) in <top (required)>'

Any way to get around getting to run inside rspec? Thanks.

amoludage commented 9 years ago

Hello @ibaralf

I have tried this with rspec and it successfully runs for my project.

I think it may be an setup issue, Can you please tell me how you configured your project with gmail gem, so that it may be help to figure out your problem.

johnnyshields commented 4 years ago

As of version 0.7.0 (Aug 19, 2018) this gem is officially deprecated and will no longer be maintained. Please instead use Google's official Gmail API Ruby Client, which uses the Gmail API rather than IMAP and has significantly better performance and reliability.