1

I have a locally-developed app that is working fine on postgres, however, once I uploaded it to heroku, I'm receiving an error in the migration:

undefined method `bool' for #<ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition:0x007fb335472530>/app/db/migrate/20150603202509_devise_create_admins.rb:5:in `block in change'

Line 5 of the referenced migration:

t.boolean :manage_users, default: false

I didn't have any problems locally, just now that it's on heroku. Using pg v0.18.2

2
  • Which versions of postgres and the pg gem are you using? Make sure they are compatible with heroku ;) Commented Jun 23, 2015 at 20:37
  • Using pg v0.18.2 which is the same as another working heroku app. And yes, the migration is being ran on the t.boolean line above, which I too thought was strange because it mentioned the "bool" method. Commented Jun 23, 2015 at 21:27

1 Answer 1

1

I ran into this error too. I did this to cause the error:

$ rails generate scaffold MyObject isGreen:bool

I fixed it by changing bool to boolean:

$ rails generate scaffold MyObject isGreen:boolean
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.