i created a table with the following schema in code
DB.create_table :Pokemon do
primary_key :id
String :first_name
String :last_name
String :email
You need to use Sequel's pg_array extension, see http://sequel.rubyforge.org/rdoc-plugins/files/lib/sequel/extensions/pg_array_rb.html
As the error says, just cast the Array expression to a string, like so:
pokes.insert(:first_name => 'abcd' ,:last_name => 'mehandiratta', :offering => off.to_s , :needs => nee.to_s)
In your database config:
DB.extension :pg_array
Then just convert each array to type PGArray:
pokes.insert(:first_name => 'abcd' ,:last_name => 'mehandiratta', :offering => Sequel.pg_array(off) , :needs => Sequel.pg_array(nee))
@Jeremy Evans' answer provides a link to the docs which include a more succinct way to do it if using the core-extensions
extension.