Adding Postgres and ActiveRecord
Getting started - adding dependencies to your project
These are the steps you should go through the sanity check your Sinatra application, deploy and test.
Load your Sinatra application locally by typing this code in your terminal window/command line:
Open the application in a browser using the information returned (something like
localhost:4567) and then go to the route we created so
You can test your app by adding querystring parameters to check if the responses look OK:
Note: Twilio will send the querystring parameters titleized (i.e. Body not body). Make sure your querystring is using the right casing.
If it works you should see a message like this:
<Response> <Message> <Body> This is my message </Body> </Message> </Response>
If you see a message like this and there’s no errors, we’re in business and can deploy. [Note: You should test your responses by changing the querystring.] Otherwise fix it…
If you do get an error:
.envhas the right info included in it
requirestatements are included in your
If the last step was successful and you have no apparent errors:
git push heroku masterand deploy your application to Heroku
Then test it by sending an SMS to your Twilio Number. Fingers crossed your bot talks to you!
If it didn’t work, but it deployed OK, do the following
heroku open, see if you get any application errors. If you did then the problem is with your code.
heroku logsto see what’s happening on the server. This will let you know why the application crashed.
GETrequest. Alternatively, the code may have crashed or given an unexpected response to Twilio.