I use Ruby (1.9.3) and Rails (3.2.2). I have a task file that contains a bunch of fake data that will be populated in my database.
Here is the part of the task that, in my opinion, is causing the problem.
#Create random Tender and populate the db 20.times do |n| title = "#{Faker::Company.bs()} tender " company_name = Faker::Company.name opening_date=Time.at(rand * Time.now.to_i) closing_date=Time.at(opening_date + ( 8*7*24*60*60))
It works fine with dev, but only this part is not running in the production database. I am using gem 'sqlite3', '1.3.5' on dev. and
gem 'pg', '0.12.2' by production (heroku)
When i started
git push heroku $ heroku pg:reset SHARED_DATABASE --confirm myapp $ heroku run rake db:migrate $ heroku run rake db:populate db:populate throws an error that says **can't covert Range to Integer.**
Any ideas what could be the problem?
EDIT: bid_amount decimal data type
Wowbow
source share