Articles tagged 'ruby'

Blog Projects

Facebook POST for Canvas fix

Latest usage and examples can be found from Rack::Facebook::MethodFix project page.

In early 2011 Facebook started to send all iframe application requests as POST. Because of this most REST based applications broke. Lets say you have object called User. To get list of users in RESTful application you would issue the following request:

GET /users/

New user is created with POST request:

POST /users/

I’m sure you can spot the problem here. You try to retrieve list of users. That does not work. Instead you end up creating new object because your request was converted to POST.

Continue reading >>

Using With HTTParty

I have been playing around with different shortener APIs for Google Analytics URL shortener. HTTParty makes this all easy and gives warm fuzzy feeling. API requires free registration to get an API key. Other than that it is pretty straight forward...

Continue reading >>

Rake Tasks For Easier Facebook Development

Lets face it. Facebook development is tedious. You do not want to waste more time in endless commit-push-pull-restart loop for smallest code changes. Common development setup is to tunnel traffic from development server to your laptop using ssh tunnel. Here are my Rake tasks for switching between production and development mode.

Facebook Application Stack

I use Sinatra, Thin, Sinbook and DataMapper for all my Facebook development. All static assets are served by Apache. Apache also proxies other requests to Sinatra using mod_rewrite. Proxying is easiest to setup using the following rule in .htaccess file:

  RewriteEngine On
  RewriteBase /

  # Everything not found goes to Sinatra / Rack
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule (.*){REQUEST_URI} [L,P,QSA]

Continue reading >>

Using With HTTParty

I recently evaluated bunch of Ruby libraries for consuming webservices. One I liked most is is HTTParty. Love the syntax and elegance. Here is how you would shorten an URL with my favourite URL shortener

require 'rubygems'
require 'httparty...

Continue reading >>

Running on Nesta

My Mephisto installation finally went fubar. I had to search for new blog engine. It needed to be simple, easy to customize, support Textile and preferably be built on Sinatra. I ended up choosing Nesta. It did not have Textile support so I wrote a patch. This proved Nesta is really easy to customize. Nesta also provided ready made scripts for importing from Mephisto. This made converting from one system to another a breeze.

Continue reading >>

Mephisto Sitemap Plugin With Engines Support

I made quick fix to Mephisto Sitemap plugin. Now it works with lates Mephisto 0.8 (Drax). All old plugins got broken when Mephisto changed to Rails Engines based plugin system.

Install by issuing the following command in your Mephisto root.


Continue reading >>

Why Fortumo Will Be Success?

HEADS UP! This article was written in 2007. Information provided might not be valid anymore and should be taken with a grain of salt.

Fortumo has good change to be next Estonian success. It does not provide anything new. Instead it provides something old but in brilliant package.

Fortumo is web application for easily creating SMS services. It is built with Ruby on Rails.

Easy way

For technically challenged Fortumo provides three ready made applications. Simplest one replies back with predefined text. Slightly more advanced version forwards sent message to email address of your choice. Third one is JavaScript shoutbox widget which you can embed to any webpage. Shouts in this case are sent with text message.

Continue reading >>

Mephisto Google Sitemaps Plugin

HEADS UP! This article was written in 2007. Information provided might not be valid anymore and should be taken with a grain of salt.

Since I recently restructured my site I wanted to make changes quickly visible to Google. Sitemaps can help with...

Continue reading >>

ThickBox Macro For Mephisto - jQuery and Rails

HEADS UP! This article was written in 2007. Information provided might not be valid anymore and should be taken with a grain of salt.

Some people consider it to be heretic to use jQuery with Ruby on Rails. Since I am big fan of jQuery I decided to do it anyway.

With filtered_column_thickbox_macro you can display single or multiple images with Lightbox effect. Macro uses Cody Linley’s ThickBox plugin. Code is based on Based on Christian Lim’s Lightbox Image Gallery Filter.


Install by issuing command (in one line):

 script/plugin install

Script will copy needed Javascript, CSS and image files into your public folder. It does not overwrite any existing files. So if you rely in specific version of jQuery library it will be safe.

Continue reading >>

Built using the awesome Flat UI Pro framework by Designmodo.

Mika Tuupola is a Member of the Leanpub Affiliate Program.

© 2014 Mika Tuupola.