Skip to main content

Posts

Showing posts from December, 2012

Deploying Rails Application on Windows Azure (Ubuntu VM)

In the last weeks, I've been exploring my options for hosting a Ruby on Rails application. An important step was Windows Azure. I registered for a 90-day trial to give it a try. One of the great services Microsoft has offered was the Ubuntu virtual machine ( :D ). So this tutorial can be useful even with a normal Ubuntu machine (except the Endpoints part) since I'm treating it like an Ubuntu machine regardless of the Azure service it is hosted on. In this tutorial, I will create a new Ubuntu 12.04 LTS virtual machine, install Ruby ( 1.9.3 ) and Rails ( 3.2.9), install Passenger gem, install Apache server and connect it to Rails application. And finally, some important notes about getting your project up and running. Create an Ubuntu 12.04 LTS VM: - In you portal, from the bottom right corner click: New -> Compute -> Virtual Machine -> From Gallery. - Scroll the list to Ubuntu Server 12.04 LTS and click it. - Fill the required data about the VM name, the us...

Ruby on Rails Facebook Application using Koala Gem

Here is a another Facebook application example ( check the python example ), but this time it is with Ruby on Rails using Koala gem. The great thing about Koala is how it is easy integrated and straight forward. Here are the steps from the very beginning: 1- Create a new Ruby on Rails project: rails new rorApp 2- Delete ./public/index.html file as it is not needed. 3- In Gemfile add: gem 'koala', '1.3.0' 4- In ./config/initializers folder, add a constants.rb file with the following data: APP_ID= '123456789' # please change! APP_SECRET= '1b2n3n5n6n7m8m9n9m0m' # please change! SITE_URL = 'http://localhost:3000/' # please change! Where APP_ID and APP_SECRET are the values you have from the Facebook application you create in the developers section, and the SITE_URL is the root URL of your application website ('http://localhost:3000/' if our case of testing locally) 5- In ./config/routes.rb, add the following routes: root...