RailsCasts Pro episodes are now free!

Learn more or hide this

Rohit Mishra's Profile

GitHub User: movingahead

Site: http://www.rohitmishra.me/

Comments by Rohit Mishra

Avatar

Why not use Postgres' full-text search @@ operator rather than LIKE?

Avatar

Thanks a lot. I wasted a couple of hours doing all sorts of things around this.

Avatar

I am using Soulmate in production, and I am facing weird performance issues. The Soulmate sinatra app doesn't respond to some queries at all, whereas for other queries the performance is pretty good.

Anyways, if you decide to use Soulmate, you should go through http://patshaughnessy.net/2011/11/23/finding-your-soulmate-autocomplete-with-redis-in-rails-3-1 and Salvatore's original post on doing autocomplete with redis - http://oldblog.antirez.com/post/autocomplete-with-redis.html

@Ryan It will be great if you can add these to the show notes.

Avatar

The way soulmate does this is to add a after_save hook to load the term in to redis.

Avatar

If you are getting a gem not installed error, then do checkout the railscasts on zero downtime deployment. You need to send a USR2 signal and set preload_app=true. More details here at stackoverflow

Avatar

Thanks a lot Ryan for this and the other Railscasts that you have done on deployment.

On Capistrano's from-the-beginning wiki, there is a section on avoiding deploy:cold which says

First of all, deploy:cold was a bad idea. It attempted to do what I have described in this tutorial, but without enough opinions, and without enough options for configuration. I’ve come to the conclusion that setting up a new app on a new machine is not something that can be generically automated.

Ryan, would you suggest to avoid deploy:cold?

Avatar

Can you elaborate on what you mean by n+1 problems?

Avatar

For accessing the total number of votes for a haiku, we need to use haiku.reputation_for(:votes) instead of haiku.reputation_value_for(:votes).

Avatar

Great episode Ryan. The Devise Omniauth documentation isn't much detailed now and I was having trouble understanding the code samples.

In the episode, you mention that adding a separate Authentications model is 'a complexity that is not always needed'. If one requires to associate the user account with multiple providers, should we make a separate authentications model or add different keys to user model like twitter_uid, facebook_uid as Adam Sunderland mentions in an earlier comment?