Tutorial adalah SAAS dari Indonesia yang dibuat menggunakan Ruby on Rails. Berikut ini langkah – langkah untuk menggunakan Appschef API dari Aplikasi Ruby on Rails 3.2 dengan gem w_platform:

  • Signup dan Daftarkan produk / aplikasi Anda di
  • Login ke dan dapatkan API_KEY untuk produk / aplikasi yang anda daftarkan
  • Edit Gemfile aplikasi Rails anda dan tambahkan code berikut:
gem 'w_platform', :git => ''
  • Di terminal run:
$ bundle install
$ rails generate w_initializer install
  • Kemudian Edit file config/w_platform.yml sesuai dengan konfigurasi aplikasi Anda, berikut contohnya:
common: &default_settings
w_api_url_users: /api/users/
w_api_url_get_active_session: /api/login
#nama aplikasi / produk Anda
app_name: w_factory_operations
<< *default_settings
# link ke website appschef
# ganti dengan Api key produk / aplikasi Anda
api_key: xxxxxxxxxxxxxxxxxxxxxxxx
# link ke website Anda
app_url: http://localhost:3000
# protokol yang digunakan ( pilihan bisa http atau https )
protocol: https
#nama controller dan action yang dijadikan root (“/”) di Aplikasi Anda
root_controller: home
root_action: index
  • Definisikan “key” untuk setiap fitur yang ada di aplikasi Anda.

Untuk menentukan fitur apa saja yang ada di Aplikasi Anda, Appschef mengharuskan anda untuk membuat daftar fitur dan “key” sebagai representatifnya. List itu harus anda buat dalam excell dan upload ke

Kemdian setelah itu anda definisikan fitur tersebut di aplikasi anda dengan edit file config/w_features.yml, berikut contohnya:

index: wfo_home_index
new: wfo_project_new
show: wfo_project_show


home, Projects => Nama Controller

index, new, show => Nama Action

wfo_home_index  => Contoh  ‘key’ untuk fitur “home/index”

  • Mount Routes WPlatform dengan edit config/routes.rb dan tambahkan code berikut:
mount WPlatform::Engine => “/”, :as => “w_platform”
  • Include WPlatformHelper dan tambahkan before filter untuk check access user ke fitur yang ada di Aplikasi Anda. Sebagai contoh Anda dapat Edit application_controller.rb dan tambahkan 2 line berikut:
include WPlatformHelper
before_filter :check_user_access
  • Langkah terakhir, Run server aplikasi Anda, kemdian login dari server appschef dan pilih untuk membuka Aplikasi Anda.


  • Anda dapat mendefinisikan controllers dan actions yang tidak memerlukan check authentikasi dengan cara berikut ini:
before_filter :check_user_access_but_skip_some_actions
def check_user_access_but_skip_some_actions
check_user_access([{:controller_name => “about”, :action_name => “index”}])
  • Anda dapat menggunakan helper yang tersedia, yaitu:

current_user_platform =>return has semua result data yang diberikan oleh Appschef server

current_company => return hash data company

current_products => return has data products

current_features => return hash fitur – fitur yang boleh diakases user

  • Menambahkan link logout
<%= link_to “Logout”, w_platform.new_authentication_session_cleaner_path, :confirm => “Anda yakin untuk logout ? ?”%>

Bug Report

Jika Anda menemukan bug dalam tutorial ini atau gem w_platform, harap hubungi saya melalui email ke:

Terima kasih.

Download the app here:


A squad of robotic rovers are to be landed by NASA on a plateau on Mars. This plateau, which is curiously rectangular, must be navigated by the rovers so that their on-board cameras can get a complete view of the surrounding terrain to send back to Earth.

A rover’s position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North.

In order to control a rover, NASA sends a simple string of letters. The possible letters are ‘L’, ‘R’ and ‘M’. ‘L’ and ‘R’ makes the rover spin 90 degrees left or right respectively, without moving from its current spot. ‘M’ means move forward one grid point, and maintain the same heading.

Assume that the square directly North from (x, y) is (x, y+1).

The first line of input is the upper-right coordinates of the plateau, the lower-left coordinates are assumed to be 0,0.

The rest of the input is information pertaining to the rovers that have been deployed. Each rover has two lines of input. The first line gives the rover’s position, and the second line is a series of instructions telling the rover how to explore the plateau.

The position is made up of two integers and a letter separated by spaces, corresponding to the x and y co-ordinates and the rover’s orientation.

Each rover will be finished sequentially, which means that the second rover won’t start to move until the first one has finished moving.

The output for each rover should be its final co-ordinates and heading.


Test Input:
5 5
1 2 N
3 3 E

Expected Output:
1 3 N
5 1 E


I am found interesting case in twitter api search using geocode params.
When I call:
it’s returned
Sorry, your query is too complex. Please reduce complexity and try again.

Strange,.because This call working some days ago.
And I spend some minutes and found that we can’t request more than 160km
This the right call:


This is linux command to delete/clean .svn files from one directory. This usually used if you have one folder in old project and want to copy-paste into new project or new svn repository.

This the command in terminal:

find . -name “.svn” -exec rm -rf {} \;

Hope this help 🙂


I want to share rails 2 app sample.
It includes
– signup
– login
– activation ( via email )
– forgot password ( send to email )
– edit profile
– create member area
– simple layout for front end and member ( include basic css )
– script to feeds table countries

To run application, Please Follow this steps:

Checkout app

git clone

Change configuration

– change configuration for database myql in config/database.yml with yours

– change google account for sending email in config/application.yml
smtp_user_name: yourgmailaccount
smtp_password: yourgmailpassword

– rake db:create && rake db:migrate
– rake migration:populate
– ruby script/server

Hope this help people !

Hi guys,

This is quick tutorial about linkedin api 1 – invitation by people email to join your linkedin network.

We will use linkedinapi rails plugin ( Created by Dimas Priyanto and Me base on oauth rails plugin )

  • initialize your linkedin api key and secret key
>> linkedin_api_key = ” YOUR LINKEDIN API KEY”

>> secret_key = “YOUR LINKEDIN API SECRET”

  • setting your callback
  • create oauth object
>> oauth =, linkedin_secret)
  • request authorize url

Open the link in your browser  as redirection url for user to do authorization process,
if user authorize it we will get params[:oauth_verifier] in our “callback_url”,
use it to authorize from request

for example:

  • authorize using oauth verifier and token
>> oauth.authorize_from_request(oauth.request_token.token, oauth.request_token.secret, oauth_verifier)
  • create linkedin api object
>> linkedin =
  • show your linkedin profile
>> linkedin.profile
“<?xml version=\”1.0\” encoding=\”UTF-8\” standalone=\”yes\”?>\n<person>\n  <first-name>Feby</first-name>\n  <last-name>Artandi</last-name>\n  <headline>Ruby on rails programmer</headline>\n  <site-standard-profile-request>\n    <url>;key=30011332&amp;authToken=nM0a&amp;authType=name&amp;trk=api*a101208*</url&gt;\n  </site-standard-profile-request>\n</person>\n”
=> “<?xml version=\”1.0\” encoding=\”UTF-8\” standalone=\”yes\”?>\n<person>\n  <first-name>Feby</first-name>\n  <last-name>Artandi</last-name>\n  <headline>Ruby on rails programmer</headline>\n  <site-standard-profile-request>\n    <url>;key=30011332&amp;authToken=nM0a&amp;authType=name&amp;trk=api*a101208*</url&gt;\n  </site-standard-profile-request>\n</person>\n”
  • invite people by email, first name and last name
linkedin.invite_by_email(“”, “Feby”, “Artandi”)

That’s it, enjoy ! 🙂

Tag Cloud