I am trying to build an application using Sinatra, Ruby, rack, haml, pony and SendGrid, with git and RVM to deploy to Heroku. The application is a variant of the blog, which should send an email with a comment on the form. On my local server, when the form submits, I get the following error:
LoadError at /
cannot load such file
file: tools.rb location: require line: 314
BACKTRACE
(expand)
/Users/Kevin/prog/ruby/Sinatra/Noobs/noobs.rb in block in <top (required)>
require 'pony'
When launched on Heroku, the submit form results in an internal server error. The error "download such a file" indicates that the file is not on the path to gem, but if I understand correctly, the OS does not agree:
➜ noobs git:(master) ✗ bundle show pony
/Users/Kevin/.rvm/gems/ruby-1.9.3-p194@noobs/gems/pony-1.4
➜ noobs git:(master) echo $GEM_PATH
/Users/Kevin/.rvm/gems/ruby-1.9.3-p194@noobs:/Users/Kevin/.rvm/gems/ruby-1.9.3-p194@global
Here is the code where a pony is required (noobs.rb):
require 'rubygems'
require 'sinatra'
require 'haml'
require "sinatra/reloader" if development?
post '/' do
require 'pony'
Pony.mail(:from => params[:name] + "<" + params[:contact] + ">",
What do I need to do to make a pony work?
source
share