Archive : ruby

RSS feed

[Fix] PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding “UTF8”

I was trying to store Random IVs generated for AES encryption but couldn’t store them into a PostgreSQL database. The Random IVs generated were binary data. So, you have to escape them. While storing, do this PGconn.escape_bytea(data) While retrieving, do this PGconn.unescape_bytea(data)  

How to install Ruby 1.9.2 on Ubuntu using RVM

Here’s a quick snippet to install Ruby on your Ubuntu system. RVM = Awesomeness! login as single user, not root. bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc source ~/.bashrc Check out the [...]
© 2015 Suhas Tech. All rights reserved.
Proudly powered by Wordpress.