Archive for 'Uncategorized'

Add multiple virtual host along with Passenger

Posted on January 5, 2010, under Uncategorized.

I was having few projects on my MAC and was really bugged up with maintaining the port numbers and other stuffs, a real cumbersome.

After, Jacek’s thought on this, I had set up the following:

Install the gem:

sudo gem install ghost

after that add a virtual host

sudo ghost add paddy.local (a choice of your virtual host)

Install the Passenger gem:

sudo gem install passenger
sudo passenger-install-apache2-module

After installing the apache module for passenger, you may have add the following lines (after installation it will tell based on your own enviroment)

(in your httpd.conf)

LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.2.8/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.2.8
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Also you may have to enable your virtual host too …by default, it may be disabled(commented) and you have to enable(uncomment) it

# Virtual hosts
Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf

Next, you have to add the vitual host for your rails app.

(httpd-vhosts.conf)

<VirtualHost *:80>
ServerName www.yourhost.com
DocumentRoot /somewhere/public    # <– be sure to point to ‘public’!
<Directory /somewhere/public>
AllowOverride all              # <– relax Apache security settings
Options -MultiViews            # <– MultiViews must be turned off
</Directory>
</VirtualHost>

And you have to restart your apache server and start your respective rails app.

Happy Developing with Virtual Host

BSNL 3G Speed

Posted on November 23, 2009, under Uncategorized.

After a long awaiting for the actual launch of 3G service in Chennai, its available now. I rushed up to the customer service center and got myself the 3G Sim Card and just tried the net speed which BSNL claims  upto 3.6 MBPS …but the result is shown in the below image

BSNL 3G Speed

BSNL 3G Speed

The performance of BSNL 3G is not that bad on the data, but still i need to check it up.

Here’s the setting that I have used:

Access Point Name: GPRSSOUTH.CELLONE.IN

User Name your mobile number ( 94xxxxxxxx )

Password your mobile number ( 94xxxxxxxx )

Dailup No *99# OR *99***1#

The download seems to be atleast ok, but the upload speed is way too less.

This is it …for now from my desk …catch you up later :-)

Cheers!

Making will_paginate to work with acts_as_taggable_on_steriods

Posted on September 1, 2009, under Uncategorized.

After going through, few post on pagination for the tags, this worked for me.

1
2
3
4
<%
 size = Upload.find_tagged_with(params[:id]).length
 @uploads = Upload.paginate_tagged_with(params[:id], :total_entries => size, :page => params[:page], :per_page => 1)
%>

Is Active

Posted on April 13, 2009, under Uncategorized.

def is_active?
(start_date .. expiry_date) === DateTime.now
end

Listing Duplicate Records

Posted on January 2, 2009, under Uncategorized.

1
SELECT id, name from names GROUP BY name having COUNT(name) &gt; 1

Mumbai attacked by Terrorist

Posted on November 28, 2008, under Uncategorized.

Its sad to hear that Terrorist had attacked the prestigious hotels like Taj, Trident and fresh new attacks in another hotel too. Earlier they had came via Boat from Pakisthan, say the Indian Foreign Affairs minister.

Shocked to hear that the death toll has increased to 100+ and few of our soldiers have also sacrificed their lives for us. A salute to Indian Army!