One of the best thing about Rails is the ease with which it allows you to develop web apps quickly by providing some sensible conventions. And with Rails 5, it allows you to make real-time web apps in a breeze … Continue reading
Category Archives: Technology
You can visit the Part 1 here. THE RAILS WAY… When you create a new rails 5 application, rails generates some files for you: For any implementation of a websocket connection, we need both the client and the server parts … Continue reading
Git is getting popular in Rails community these days, as there were being many changes in rails to support Git.
Git is a open sourse fast version controller system. It was originally designed by Linus Torvalds to handle large projects. It was inspired by Monotone & BitKeeper. It is a distributed version controlling system. It gives […] Continue reading
You may have noticed by now, that in Rails 2.0 changeset 7422, you can specify columns you want to add/remove in your migration by passing attribute:type pairs to the migration generator.
For example, lets assume that we need to add a column ‘role’ in users table(User model). In this case generate a migration like:
script/generate migration […] Continue reading
Some days ago I wrote a post about “SVN commit notification” which uses a perl script for sending commit notification with svn diff by mail. In this mail you can find svn diff from the last committed revision. I used to love this mail, soon I realized that it is a bit ugly and difficult […] Continue reading
Consider a case of STI where:
class User < ActiveRecord::Base
class Customer < User
class Manager < User
Now try following at console:
User.create(:name => “Akhil Bansal”)
Manager.create(:name => “Akhil Bansal”)
Customer.create(:name => “Akhil Bansal”)
This will let you create three records in users table with same name, validates_uniqueness_of written in User class has no effect on it. validates_uniqueness_of automatically […] Continue reading
Hours ago, I posted about, “How to deploy rails application with pound as a Balancer”.
Lets run rails application on https with pound. For that your machine should have:
* Pound installed with ssl support
* Pound and mongrels running
Now, First of all we need a ssl certificate, that can be generate by issuing “openssl req -x509 -newkey […] Continue reading
Now a days Apache + mod_proxy + mongrel_clusters, Lighttpd + Mongrel cluster and Nginx + mongrel cluster are well known for deploying rails applications.
You can also deploy your rails application with pound(a reverse proxy, load balancer and HTTPS front-end for Web server).
First you need to setup mongrel_clusters for your rails application by issuing […] Continue reading
I was using acts_as_searchable for one of my project, which uses Hyperestraier in background. Yesterday I decided to use acts_as_solr which uses solr(based on Lucene Java search library). I did all written in its Manual/Readme, but when I issued
to start the solr server, it threw a heart breaking “Bad file descriptor” error, […] Continue reading
Yesterday I posted about CruiseControl for Rails projects. It was working fine with all my rails projects using traditional test cases, But today I faced a problem with a project using RSpec. Actually, By default CruiseControl follows the following step to build:
This default was not working with my last project As I […] Continue reading