Its all about Ruby On Rails
Edge rails: ActiveRecord::Base.each and ActiveRecord::Base.find_in_batches for batch processing
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 refer here for more details.
11 Things to Consider Before Deploying Your Rails Application
November 16, 2009 - 5:21 pm
Tags: deploy, deployment, Rails, ROR, Rubyonrails, server, Tips
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: bash, git, Rails, ROR, ruby, Rubyonrails, Tips, tricks
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: hosting, server, Tips, Trick, tricks, ubuntu
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: linux, Rails, rails_plugin, ruby, Rubyonrails, Tips, tricks, ubuntu
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: Rails, rails_plugin, ROR, ruby, Rubyonrails, Tips, tricks
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: printing, RailRoad, Rails, ROR, ruby, rubygems, Rubyonrails, Tips, Trick, tricks
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: debian, hosting, linode, Rails, rails stack, ROR, ruby, Rubyonrails, server, slicehost, Tips, tricks
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 [...]
Rails Plugin: role_requirment, Clean role-based security for restful_authentication
February 13, 2009 - 10:22 pm
Tags: Rails, rails_plugin, ROR, ruby, Rubyonrails, Tips, tricks
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
[...]
rake -T does not list my custom rake task
February 13, 2009 - 9:05 pm
Tags: Rails, rake, ROR, ruby, Rubyonrails, Tips, tricks
Posted in ROR, Rails, Tips, rake, ruby, tricks | 2 comments
This is just a tip, may be you guys are already aware of it.
Sometimes I wonder why my custom rake task doesn’t appear in rake -T list, however it runs well. I just noticed that if I do not specify description for a task then that particular rake task does not appear in the [...]
Tip: Open DB shell/console from rails root dir
January 29, 2009 - 8:47 pm
Tags: Rails, ROR, ruby, Rubyonrails, sake, Tips, Trick, tricks
Posted in ROR, Rails, Rubyonrails, Tips, database, ruby, sake, tricks | No comments
Just a quick tip you might be using this already.
If you guys want to open your app’s DB shell. Then you can use rails utility ‘dbconsole’ by issuing “script/dbconsole” from rails root directory.
It will ask for DB password, and open your db shell.
If you use sake, you may like following sake task:
desc ‘Launches the database [...]

May 24, 2009 - 10:13 pm
You might want to know in your post that .each has been changed to find_each to resolve some conflicts.
Thanks!