Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
testing embedded images on GH readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhinnery committed Aug 27, 2013
1 parent 7ed2b34 commit 8023165
Showing 1 changed file with 2 additions and 35 deletions.
37 changes: 2 additions & 35 deletions README.md
Expand Up @@ -4,42 +4,9 @@ As members of the Cloud9 guild, you will be working through the challenges of Tw

## Setting Up

We assume that before you begin, you will have [Ruby](http://www.ruby-lang.org/en/) and [RubyGems](http://rubygems.org/) installed on your system. If you are on OS X, this should already be done for you. On Windows, [you will need to do some work](https://forwardhq.com/support/installing-ruby-windows).
Your first step will be [signing up for a free account with Cloud9](https://c9.io/site/pricing/). Once you have successfully signed up for an account, you must [go to your account dashboard from the home page](https://c9.io/). On your dashboard, click "Create New Workspace":

Before you can run this project, you will need to set three system environment variables. These are:

* `TWILIO_ACCOUNT_SID` : Your Twilio "account SID" - it's like your username for the Twilio API. This and the auth token (below) can be found [on your account dashboard](https://www.twilio.com/user/account).
* `TWILIO_AUTH_TOKEN` : Your Twilio "auth token" - it's your password for the Twilio API. This and the account SID (above) can be found [on your account dashboard](https://www.twilio.com/user/account).
* `TWILIO_NUMBER` : A Twilio number that you own, that can be used for making calls and sending messages. You can find a list of phone numbers you control (and buy another one, if necessary) [in the account portal](https://www.twilio.com/user/account/phone-numbers/incoming).

For Mac and Linux, environment variables can be set by opening a terminal window and typing the following three commands - replace all the characters after the `=` with values from your Twilio account:

export TWILIO_ACCOUNT_SID=ACXXXXXXXXX
export TWILIO_AUTH_TOKEN=XXXXXXXXX
export TWILIO_NUMBER=+16518675309

To make these changes persist for every new terminal (on OS X), you can edit the file `~/.bash_profile` to contain the three commands above. This will set these environment variables for every subsequent session. Once you have edited the file to contain these commands, run `source ~/.bash_profile` in the terminal to set up these variables.

On Windows, the easiest way to set permanent environment variables (as of Windows 8) is using the `setx` command. Note that there is no `=`, just the key and value separated by a space:

setx TWILIO_ACCOUNT_SID ACXXXXXXXXX
setx TWILIO_AUTH_TOKEN XXXXXXXXX
setx TWILIO_NUMBER +16518675309

## Running the application

[Download the project source code directly](https://github.com/twilio/starter-ruby/archive/master.zip) or [clone the repository on GitHub](https://github.com/twilio/starter-ruby). Navigate to the folder with the source code on your machine in a terminal window.

You will first need to install the application's dependencies. You can do this manually using RubyGems, or you can install them using [Bundler](http://bundler.io/) and the include gem file. To install via bundler, type:

bundle install

To install the gems manually (if you don't know what bundler is and/or don't have it installed), type the following commands:

gem install twilio-ruby
gem install sinatra

Now, you should be able to launch the application. From your terminal, run `ruby app.rb`. This should launch your sinatra application on port 4567 - [visit that URL on your local host](http://localhost:4567/). Enter your mobile number in the fields provided, and test both SMS text messages and phone calls being sent to the mobile number you provide.
![new workspace](http://demo.kevinwhinnery.com/upload/Dashboard_-_Cloud9-20130827-075733.png)

## Begin Questing!
This is but your first step into a larger world. [Return to TwilioQuest](http://quest.twilio.com) to continue your adventure. Huzzah!

0 comments on commit 8023165

Please sign in to comment.