Ruby with Sinatra not loading when adding SendGrid or Mandrill

105 Views Asked by At

I'm building a basic Ruby app with Sinatra and SendGrid.

When I try and run the file ruby app.rb the site does not load. When I remove require 'sendgrid-ruby' the app loads. Code below.

app.rb

require "sendgrid-ruby"
require "sinatra"
set :app_file, __FILE__

get '/' do
  puts "hi"
end

Gemfile

gem 'sinatra'
gem 'sendgrid-ruby'

Any help? I don't have a config.ru or anything else at this point. No error logging. It just hangs at waiting for LocalHost.

== Sinatra (v1.4.7) has taken the stage on 4567
for development with backup from Thin
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on localhost:4567, CTRL+C to stop

Ruby version: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]

EDIT: Previously, I had require "sinatra" first and I didn't have set :app_file, __FILE__ in there at all.

0

There are 0 best solutions below