Easy Ruby on Rails Deployment using Phusion Passenger a.k.a. mod_rails

July 13th, 2008

While developing applications in Ruby on Rails is enjoyable and fun, deploying them is not. The original deployment option is FastCGI. It is a hell to configure, so someone developed Mongrel. Though Mongrel is easier to configure, maintaining it is not. So the guys from Phusion developed mod_rails which promises to make deploying Rails application as easy as uploading PHP scripts.

I maintain a server which hosts several Rails and PHP applications. The Rails apps were using the Apache / Mongrel combo. Maintaining those port numbers are pain in the ass. So when I decided to upgrade the Linux distribution in the server, I decided to try Phusion’s Passenger mod_rails.

Installation is a breeze. I used the gem install option:

# gem install passenger

# passenger-install-apache2-module

The command above will attempt to install the apache2 module. The installation script is so intuitive that it will even tell you what dependencies you lack and the commands on how to install them. I use Ubuntu on my server so installing the missing dependencies, like apache2 development headers and Open SSL library for Ruby.

After the installation, you need to load the module into your apache2 configuration file. In case of Ubuntu, you need to put it in /etc/apache2/sites-available/default.

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.1/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.1
PassengerRuby /usr/bin/ruby1.8

Next step is to configure the apps. The basic configuration requirement for a Rails app is:

ServerName www.yourhost.com
DocumentRoot /somewhere/public

After that, just restart your Apache and your Rails app is now working. Wow, I wished we have this before mongrel. It saved a lot of configuration and maintenance headaches.

How to Use a BayanTel Wireless Landline (ZTE) for Internet Under Linux

January 29th, 2008

If you have a wireless landline ZTE device, notably under BayanTel, you can use it to dial-up for Internet access using the guide below:

http://www.linuxquestions.org/questions/linuxanswers-discussion-27/discussion-cdma-modemphone-howto-452943/

I just followed the guide and everything worked the first time under Ubuntu Feisty Fawn. The exact device model that I used is a ZTE WP960CD.

I think everyone should get a wireless landline because it is really easy to use, portable, and you can use it for Internet access. I don’t see any reason now why anyone should use the traditional copper wire setup. Though there are times that the wireless landline is flaky, I believe the performance will be better this coming months as more people will opt to get this technology.

AJAX - Does it Matter for Common People?

July 30th, 2007

With AJAX, developers can now create snappy and desktop-like web applications. This is the new trend in the Web. But the question is, does a refresh-less web site matter for common people?

A lot of end users use Yahoo for their mail. Gmail may look more spiffy and snappy because of its AJAXish interface, but Yahoo mail already works for most people. So they don’t see the need to migrate especially that the disk space for both email systems are almost the same.

I observed some of my clients and relatives on how they use Yahoo Mail Beta. I was surprised that they still use the Back and Refresh buttons of their web browsers. One promise of AJAX-based apps is to minimize or remove completely the refresh of a page. Using the refresh button to check for new mail basically defeats the purpose of AJAX.

One solution, that I think would work for the future, is to remove the refresh and back buttons in web browsers if we want to completely move to Web 2.0. This way users will be forced to use web applications as if they were desktop ones.

BNI Harvest Ortigas Chapter is Launching

June 24th, 2007

If you are an entrepreneur or business owner and you are looking for business connections, referrals, and leads, this might interest you.

Our business club chapter, the Business Network International Harvest Ortigas Chapter, will have its official launch on June 27, 2007 at Discovery Suites, Ortigas Center, Pasig City, Philippines. The program will start at 7:00 am. We expect around 80 business professionals and entrepreneurs from different industries. This is a great way to network and get referrals for you business.
BNI stands for Business Network International. It is a professional referral and networking organization with over 1500 chapters around the world. The Philippines is the newest country to be included with BNI Quezon City as its pioneering chapter. For more information, please visit:

http://bniphilippines.wordpress.com/

Please email me if you are interested to join. A ticket costs Php 500.00 only.

The Horrible User Interface of GIMP

April 3rd, 2007

I had the opportunity to teach a course on the basics of web development at the Business Maker Academy. The students are end-users who don’t have any prior experience in programming or development. I took this opportunity to promote FOSS tools like NVU, Gimp, and FileZilla by using them in the course.

Read the rest of this entry »

A Step by Step Guide in Installing RMovie

March 18th, 2007

In this article, we’ll learn how to install RMovie in Ubuntu Edgy.

What is RMovie?

RMovie is a Ruby library based on the ffmpeg library that enables you to manipulate videos. With RMovie, we can create Ruby applications that can handle videos.

http://rmovie.rubyforge.org/

Read the rest of this entry »

Hypermedia Web Site up and running!

March 18th, 2007

Finally, the Hypermedia web site has been resurrected. Yey!