Cronofy Ruby Sample Application
A Git Tool
We would recommend downloading and using the Git Bash tool, which you can find here.
A cloned version of this repository
For help in cloning this repository please see this article.
A Ruby on Rails environment
We recommend using RailsInstaller to set up Ruby on Rails on your machine.
Create a Cronofy application
To use the Cronofy Ruby Sample App you need to create a Cronofy application. To do this, create a free developer account, click "Create New App" in the left-hand navigation and create an application.
Once you've created your application you will need to set the
CRONOFY_CLIENT_SECRET in the application's
Deploying the Sample App
Open a terminal window, navigate it to your cloned repository, and run
script/run. This will set up your project and run your application at
Setting up a Remote URL
In order to test Push Notification callbacks and Enterprise Connect user authentications your application will need to be reachable by the internet.
To do this we would recommend using ngrok to create a URL that is accessible by the Cronofy API.
Once you have ngrok installed you can initialise it for your application by using the following line in your terminal:
ngrok http -host-header=localhost localhost:3000
Your terminal will then display a URL in the format
http://[unique identifier].ngrok.io. You will need to set the
DOMAIN variable in the application's
config/local_env.yml in order to test these remote features.
Setting up Google Maps
In order to view geo-location that has been set on events you will need to set the
GOOGLE_MAPS_EMBED_API_KEY in the application's
config/local_env.yml file. You can get your key from here by clicking "GET A KEY": Google Maps Embed API
config/local_env.yml file should look similar to this:
CRONOFY_CLIENT_ID: [cronofy client id] CRONOFY_CLIENT_SECRET: [cronofy client secret] DOMAIN: http://[ngrok identifier].ngrok.io GOOGLE_MAPS_EMBED_API_KEY: [google maps embed api key]