Akhil Bansal

This user hasn't shared any biographical information

Jabber/GTalk: admin


Posts by Akhil Bansal

11 Things to Consider Before Deploying Your Rails Application

November 16, 2009 - 5:21 pm

Tags: , , , , , ,
Posted in ROR, Rails, Rubyonrails, deploy, deployment, vinsol | 1 comment

Cross Posted from http://vinsol.com/blog
At VinSol, we have been developing and deploying Rails applications for more than four years. During this period, we have identified some best practices that we prefer to follow while deploying rails application to production server.
Below is the checklist of these practices:
 
1. Ensure that NS records [...]

Displaying information about your git repository

November 12, 2009 - 6:39 pm

Tags: , , , , , , ,
Posted in Rails, Tips, bash, git, linux, scripts, tricks, ubuntu, utility scripts | 1 comment

Want to see information about your git repository?
Based on a discussion here Duane Johnson wrote a very useful bash script. I am using this script from months and would like to share with you. You can download this script here().
You can also add an alias like below, so that I can be a accessed [...]

Change timezone of ubuntu machine from command line

July 15, 2009 - 9:17 pm

Tags: , , , , ,
Posted in bash, hosting, ubuntu | 7 comments

If you guys want to change timezone of your ubuntu machine then you can do it by issuing:

dpkg-reconfigure tzdata

This may be helpful if you deal with servers.

Multiple versions of ruby on ubuntu

June 23, 2009 - 9:03 pm

Tags: , , , , , , ,
Posted in ROR, Rails, Rubyonrails, Tips, linux, ruby, tricks, ubuntu | 1 comment

Three-Four days ago I was in a situation where I need to have multiple versions of ruby and rubygems on my ubuntu machine. I was lucky, I found an awesome article http://blog.michaelgreenly.com/2008/08/multiple-versions-of-ruby-on-ubuntu-2.html. This really solved my problem, Many thanks to Michael Greenly.

Taskit: Another task scheduler for rails

May 21, 2009 - 12:02 pm

Tags: , , , , , ,
Posted in ROR, Rails, Rubyonrails, Tips, rails_plugin, ruby | No comments

While searching something I found and interesting plugin ‘Taskit‘, which I want to test for sure in production/staging when ever I get the chance.
Anybody tried it already?

Printing large image diagrams generated by RailRoad

March 23, 2009 - 3:54 pm

Tags: , , , , , , , , ,
Posted in ROR, Rails, Rubyonrails, Tips, rails_plugin, ruby, tricks | No comments

I use RailRoad for generating Ruby on Rails diagrams, but always wish I could print those diagrams. Generally diagrams are too big to print on a single A4 size paper and I didn’t find any tool to print larger images in parts so that I can join them. If I print the image generated by [...]

Hassle free installation of rails stack on debian based system

February 23, 2009 - 10:04 pm

Tags: , , , , , , , , , , ,
Posted in ROR, Rails, Rubyonrails, Tips, deploy, ruby, tricks | 5 comments

Want to install rails stack on a machine? Just follow these steps. It will setup a rails stack(Apache + passenger + mysql + ruby + rubygems + common gems + git) on any server(debian based)

apt-get update
apt-get upgrade -y
apt-get -y install build-essential libssl-dev libreadline5-dev zlib1g-dev
apt-get -y install mysql-server libmysqlclient15-dev mysql-client
apt-get -y install [...]

Edge rails: ActiveRecord::Base.each and ActiveRecord::Base.find_in_batches for batch processing

February 23, 2009 - 9:15 pm

Tags: , , , , , ,
Posted in ROR, Rails, Rubyonrails, Tips, edge_rails, ruby, tricks | 2 comments

You guys must faced a situation when you need to process large number of records, for example sending newsletters. Then you must have done some sort of batch processing to save it eating up all of your memory. This feature is committed to rails core by DHH.
Now you can do something like User.each and User.find_in_batches.
Please [...]

Export Mercurial(Hg) repository to git repository

February 19, 2009 - 8:41 pm

Tags: , ,
Posted in Mercurial, git, hg | No comments

Rails Plugin: role_requirment, Clean role-based security for restful_authentication

February 13, 2009 - 10:22 pm

Tags: , , , , , ,
Posted in ROR, Rails, rails_plugin | 1 comment

I just found a very useful plugin role_requirement to manage roles in rails app.
RoleRequirement focuses on a simple approach to role-based authentication. RoleRequirement leverages the power of !Ruby to strike a marvelous balance between simplicity and flexibility.
Features:
* A user can have many roles or one role
[...]