Changing Like ? or like ? to ILIKE ? fixed a problem i was having with 
Heroku. Turns out this is a good reason why using PG in development and 
production is a good idea. In my instance Rails is database agnostic to 
setup is actually pretty easy.

If anybody else plans to do this bare in mind on existing apps you will 
have to reseed your database after changing from sqlite to pg.

development:
  adapter: postgresql
  encoding: SQL_ASCII
  database: appname_development
  pool: 5
  username:
  password:

hope that helps

On Tuesday, January 26, 2010 at 3:57:38 PM UTC, Max A wrote:
>
> Well...there's a good reason MySQL is generally more popular --
> Postgresql may be faster/more features, but boy is it a pain to
> configure locally (at least last I checked), compared to MySQL where
> it's basically install, set root password, and you're golden.
> (Obviously you need to create non-root users, but that's
> straightforward)
>
> On Jan 26, 7:29 am, Sunny Beach <sunnybeach1...@gmail.com> wrote:
> > Many thanks, that seems to make everything work!
> >
> > Sunny
> >
> > ps. yes, I should be using postgres locally.
> >
> >
> >
> > On Tue, Jan 26, 2010 at 10:23 AM, Nick Quaranto <n...@quaran.to> wrote:
> > > Are you using MySQL to develop locally instead of Postgres? MySQL 
> considers
> > > LIKE case insensitive, you need to use ILIKE on postgresql to get the 
> same
> > > behavior.
> >
> > > -Nick
> >
> > > On Tue, Jan 26, 2010 at 10:20 AM, Sunny Beach <
> sunnybeach1...@gmail.com>
> > > wrote:
> >
> > >> I have narrowed down the problem to capitalization. If the query
> > >> string matches up (exactly) then all is well.
> >
> > >> BAD:
> > >>http://content-tracker.heroku.com/program_names.js?q=inter
> >
> > >> GOOD: (finds three "International..." programs)
> > >>http://content-tracker.heroku.com/program_names.js?q=Inter
> >
> > >> I have not been able to figure out how to fix this.
> >
> > >> You can see the full list of programs (only 20 currently):
> > >>http://content-tracker.heroku.com/program_names.js
> >
> > >> Sunny
> >
> > >> On Jan 25, 11:20 pm, Sunny Beach <sunnybeach1...@gmail.com> wrote:
> > >> > I have a small app that has a single Jquery Autocomplete field. It
> > >> > seems very slow and spotty (not returning all the results it should)
> > >> > on Heroku. It does work but not very well.
> >
> > >> > Is this due to the differences in databases between here and Heroku?
> > >> > The call for the autocomplete is:
> > >> > ProgramName.find(:all, :conditions => ['name LIKE ?',
> > >> > "%#{params[:q]}%"])
> >
> > >> > Is it due to a query limit (I am the only person using it at the
> > >> > moment).
> >
> > >> > Any ideas?
> >
> > >> > Thanks,
> > >> > Sunny
> >
> > >> --
> > >> You received this message because you are subscribed to the Google 
> Groups
> > >> "Heroku" group.
> > >> To post to this group, send email to her...@googlegroups.com 
> <javascript:>.
> > >> To unsubscribe from this group, send email to
> > >> heroku+un...@googlegroups.com <javascript:>.
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/heroku?hl=en.
> >
> > > --
> > > You received this message because you are subscribed to the Google 
> Groups
> > > "Heroku" group.
> > > To post to this group, send email to her...@googlegroups.com 
> <javascript:>.
> > > To unsubscribe from this group, send email to
> > > heroku+un...@googlegroups.com <javascript:>.
> > > For more options, visit this group at
> > >http://groups.google.com/group/heroku?hl=en.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to