Closed bootstraponline closed 9 years ago
From @johnnyshields on January 15, 2015 16:13
My guess is that Gmail is requiring a lib which defines ActiveSupport as a constant but doesn't actually load it.
In https://github.com/nu7hatch/gmail/blob/master/lib/gmail.rb you can see these requires:
require 'net/imap'
require 'net/smtp'
require 'mail'
require 'date'
require 'time'
Mail in particular looks suspect, see requires here: https://github.com/mikel/mail/blob/master/lib/mail.rb
So... to summarize, see if you get the same result with 'mail' gem instead of 'gmail', and if so, close this issue and file it with mail here: https://github.com/mikel/mail
From @johnnyshields on January 15, 2015 16:15
FYI this may be related: https://github.com/mikel/mail/issues/574
From @yebyen on January 15, 2015 17:28
Thanks! That's it exactly.
From @yebyen on January 15, 2015 16:8
For some reason I have to
require 'ap'
before Irequire 'gmail'
— I think this order dependence is a bug of the gmail gem, but I don't even know where to start to look. My gemfile.lock does not even mention activesupport, so I'm double confused why I would get this type of error.Gemfile:
test.rb:
bundle exec ./test.rb
:If I switch the order of the require statements it's fine:
test.rb:
(no crash)
Copied from original issue: nu7hatch/gmail#132