Web On Rails http://webonrails.com Exploring RubyOnRails Wed, 10 Sep 2008 05:53:57 +0000 http://backend.userland.com/rss092 en Hoptoad: An Rails Exception Handling Service Many of you guys(as me) may have used Exception Notifier plugin to get Rails app exceptions right into your mailbox, and may also have faced some problem like this. Also if you have 2-3 or more apps running in production then managing such exception mails is also a big headache. ... /2008/08/12/hoptoad-an-rails-exception-handling-service/ Configuring TinyMCE SpellChecker with rails application Last month I spent much time while configuring tinymce's spellchecker with my rails application. But finally I got it working and thought I could be a good post. To configure this I took some help form gusto's blog and google (as usual). So, Lets do it now without spending more ... /2008/08/08/configuring-tinymce-spellchecker-with-rails-application/ Hosting Rails app and Wordpress on same domain(as folder instead of subdomain) Hey guys, Yesterday I did an interesting server configuration. Actually we had a rails app hosted on server which is using passenger(a.k.a mod_rails). This application can be access by going to http://domain.com . Also we had a wordpress running which could be access by going to http://blog.domain.com. But, for SEO ... /2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/ Installing gem on Leopard May be you guys have noticed that when you try to install a new gem on your machine it says some thing like "Updating meta data for 500 gems" and display one dot per gem. These dots moves very slowly and stops in some time. I faced this situation many ... /2008/08/07/installing-gem-on-leopard/ When Ultrasphinx is used with polymorphic associations… Lets first consider simple has_many and belongs_to associations as: [source:ruby] class Article < ActiveRecord::Base has_many :comments end [/source] [source:ruby] class Comment < ActiveRecord::Base belongs_to :article end [/source] Now if you wish to index the title of associated article with comment for searching, you just need to add " is_indexed :fields => :body, :include => [{ :association_name => ... /2008/08/07/when-ultrasphinx-is-used-with-polymorphic-associations/ When Ultrasphinx is used with STI… Hi Guys, it has been a long time since I last posted. I had worked on several things since then, and have couple of posts pending/draft. One of those posts is related to Ultrasphinx, when it is used with STI models. For those who are new to Ultrasphinx: Ultrasphinx is a ... /2008/07/31/when-ultrasphinx-is-used-with-sti/ Git Error: trailing whitespace, indent SP followed by a TAB, unresolved merge conflict I have been using Git from last few days, and faced following errors while committing: 1) Trailing whitespace 2) Indent SP followed by a TAB 3) Unresolved merge conflict The first error "Trailing whitespace" is because of carriage-return/line-feed(windows style line feed/end). To resolve this problem comment following lines(58-60) in .git/hooks/pre-commit file: [source:c] if (/\s$/) ... /2008/04/23/git-error-trailing-whitespace-indent-sp-followed-by-a-tab-unresolved-merge-conflict/ Rails Plugin Annotate Models For Spec And Spec Fixtures I have been using "Annotate Models" rails plugin written by Dave Thomas since I found it around one and half year ago. It really helps while writing fixtures. But if you use RSpec you might miss schema info at the top of your rspec fixture file as I do. So, ... /2008/04/23/rails-plugin-annotate-models-for-spec-and-spec-fixtures/ Git - Fast Version Control System 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 ... /2008/02/15/git-fast-version-control-system/ Migration: Adding/Removing columns are now much easier 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 ... /2008/01/23/migration_adding_removing_columns_are_now_much_easier/ Ajax based online ruby API documentation http://www.rubybrain.com/ /2008/01/14/ajax-based-online-ruby-api-documentation/ Ruby Script for SVN commit notification with log message, list of updated files and readable colored SVN Diff 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 ... /2008/01/14/ruby-script-for-svn-commit-notification-with-log-message-list-of-updated-files-and-readable-colored-svn-diff/ Presented at BarCampDelhi3 Yesterday, I attended third barcamp in delhi. I presented a session "Deploying rails application in EC2". It was an amazing experience. We talked about EC2 and I had given a demo "How to deploy rails application on EC2". I personally didn't like some sessions. There were people from some company ... /2007/12/10/presented-in-barcampdelhi3/ Third Delhi BarCamp I have a great news for you guys. We are planning Third BarCamp on Saturday, 8 December 2007, in Delhi. Venue is not finalize yet, We have some options and shortlisting the final one. We are also waiting for someone to take the sponsorship ;-) Some people have proposed their sessions, I ... /2007/11/21/third-delhi-barcamp/ Two best online API/Rails API Today I found two best API sites. One is http://www.gotapi.com. This site provides APIs of almost all languages. The other API site which is only focused on Rails is http://www.railsbrain.com/. I like this most. You can also download this API. It is AJAX based fast, useful. /2007/11/05/two-best-online-api-rails-api/