jhk753 / gmail-ruby-api

Ruby interface for Gmail API
Other
26 stars 20 forks source link

"Cannot load such file" error with Rails 4.2 on Heroku #5

Closed knice closed 9 years ago

knice commented 9 years ago

I have the following in the Gemfile of my rails app:
gem 'gmail-api-ruby', :require => 'Gmail'

It works fine in development, but when I push to Heroku, I get the following error: LoadError: cannot load such file -- Gmail

I've tried requiring the gem directly in my controller as well. I'm not sure if it is an issue with the gem, because this is the only gem in my Gemfile using :require to load the gem as a different name. But I thought I'd ask just in case.

knice commented 9 years ago

I discovered the :require bit in the Gemfile is case sensitive. I changed 'Gmail' to 'gmail', rebundled, and everything worked.

Carpela commented 9 years ago

This problem still occurs with heroku. I'd suggest updating the readme to require 'gmail' rather than Gmail, as this avoids the issue.