This is an example application which can be run on Bluemix using the Rails 3.2
This demonstration illustrates an application leveraging the Twilio API on IBM Bluemix.
- Clone the app (i.e. this repo)
git clone https://github.com/IBM-Bluemix/ruby-rails-db.git
cd ruby-rails-db
- If you don't have one already, create a MySQL service. With Bluemix, the following command will create a free MySQL databse.
cf create-service mysql 100 mysql-db
-
Edit the manifest.yml file. Change the application 'name' attribute to something unique.
-
Push to Bluemix with the updated
manifest.yml
.
cf push
Access your application URL in the browser. The default route will land you on the contacts page where you will need to create two or more contacts to actually use the application.
When you navigate to the "Calls" route you will be prompted to enter your Twilio credentials. You'll need at least a sid
a secret
and a from number
(a phone number either issued or validated by Twilio).
Previously with this example, it was necessary to create the database manually. Now this happens automatically when you push the application. Here's how this works.
- The app is pushed & stages.
- Your MySQL service is bound to the app.
- The app droplet is run.
- The db migration scripts execute.
- The app itself starts.
The migration scripts use the technique described here.