ruby on rails - Postgres not allowing ">=" but mysql does, how to overcome? -
my local rails database mysql server host (heroku) postgres. mutual combination.
i have advanced search form work locally in development mode not in production , looks might postgres specific thing heroku log shows getting:
line 1: ...,18,19,17,4,32,23,24,16,6,13) , (version_number >= 0.0 or ... 2014-06-23t01:47:54.198026+00:00 app[web.1]: ^ 2014-06-23t01:47:54.198022+00:00 app[web.1]: activerecord::statementinvalid (pg::undefinedfunction: error: operator not exist: character varying >= numeric 2014-06-23t01:47:54.198028+00:00 app[web.1]: hint: no operator matches given name , argument type(s). might need add together explicit type casts.
in log.
is there way >= in postgres.
locally see datatype
string
in schema.rb
problem. there way can cast integer rails pg?
postgresql have >=
operator: http://www.postgresql.org/docs/current/static/functions-comparison.html
your problem seem comparing string number.
is there way can cast integer rails pg?
probably - can't see code. did write sql? or did rely on activerecord? datamapper? sequel? can't help without seeing did.
mysql ruby-on-rails postgresql heroku heroku-postgres
No comments:
Post a Comment