I'm a Ruby newbie so apologies if this question is simple. And many thanks in advance for your help.
We have a Sinatra application that's been deployed onto Heroku. We're trying to add a page that sends a simple email. I've added the SendGrid add-on to the Heroku app. Now, I'm just trying to add the Ruby code that creates and sends the message using the SendGrid SMTP server information.
The problem I'm having is that even though I installed the Mail gem on the Heroku app (by adding to the Gemfile), I get an error when the Heroku app is launched complaining that 'treetop/runtime' is not installed:
←[32m2012-04-03T16:37:49+00:00 app[web.1]:←[0m /app/.bundle/gems/ruby/1.9.1/gems/mail-2.4.4/lib/mail.rb:75:in `require': no such file to load -- treetop/runtime (LoadError)
←[32m2012-04-03T16:37:49+00:00 app[web.1]:←[0m from /app/.bundle/gems/ruby/1.9.1/gems/mail-2.4.4/lib/mail.rb:75:in `rescue in block in <module:Mail>'
←[32m2012-04-03T16:37:49+00:00 app[web.1]:←[0m from /app/.bundle/gems/ruby/1.9.1/gems/mail-2.4.4/lib/mail.rb:69:in `block in <module:Mail>'
←[32m2012-04-03T16:37:49+00:00 app[web.1]:←[0m from /app/.bundle/gems/ruby/1.9.1/gems/mail-2.4.4/lib/mail.rb:68:in `each'
←[32m2012-04-03T16:37:49+00:00 app[web.1]:←[0m from /app/.bundle/gems/ruby/1.9.1/gems/mail-2.4.4/lib/mail.rb:68:in `<module:Mail>'
←[32m2012-04-03T16:37:49+00:00 app[web.1]:←[0m from /app/.bundle/gems/ruby/1.9.1/gems/mail-2.4.4/lib/mail.rb:2:in `<top (required)>'
←[32m2012-04-03T16:37:49+00:00 app[web.1]:←[0m from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
Similarly, when I try to install the Pony gem, it complains that it can't load Mail. Oddly, this is all works on my local system, so I think it's a problem with Heroku. I just can't get Heroku to fully load everything it needs from either Pony or Mail to launch successfully. (Note: I can't even get Heroku to launch, so I can't even test the actual sending of the email code.)
Any specific help/insight would be greatly appreciated. Has anyone encountered this with Heroku? Are there other gems that might work for this simple purpose?
Thanks!
P.S. The bundle successfully installed mail (2.4.4) and pony (1.4).