local sqlite development vs Heroku PG deployment

29 views
Skip to first unread message

Joe Guerra

unread,
Jan 31, 2017, 10:24:13 PM1/31/17
to Ruby on Rails: Talk
This is driving me crazy.  I have my web app working great in development, then I commit and push it to Github and heroku automatically deploys my app.

Unfortunately, it doesn't quite work out the same as the development.  

Pages aren't being found on production, but they are there in development and they are on my github repo.  

Heroku logs are not very useful either.  :(

Any suggestions?

Thanks,
Joe

Joe Guerra

unread,
Jan 31, 2017, 10:55:25 PM1/31/17
to Ruby on Rails: Talk
ok, I solved of my problems.  My git commit / push didn't work.  Thats working now.


the other thing is...

 ActionView::Template::Error (PG::UndefinedColumn: ERROR:  column "startdate" does not exist
2017-02-01T03:51:33.326023+00:00 app[web.1]: LINE 1: SELECT  "products".* FROM "products"  ORDER BY Startdate ASC...
2017-02-01T03:51:33.326023+00:00 app[web.1]:                                                        ^
2017-02-01T03:51:33.326024+00:00 app[web.1]: HINT:  Perhaps you meant to reference the column "products.Startdate".

Startdate is a column in my database table, I don't know where it coming up with 'startdate' does not exist?  I don't have that in any of my references.

Thanks,
Joe

Walter Lee Davis

unread,
Feb 1, 2017, 6:25:24 PM2/1/17
to rubyonra...@googlegroups.com
Are you using capital letters in your table names? You're going to have to do some extra work to get that to work, because the standard is lower-case table names. Some RDBMs don't care what case you use for table names, but some do.

Walter


>
> Thanks,
> Joe
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a99a74c0-76b7-4b5c-a67d-9005a77d852d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Rob Biedenharn

unread,
Feb 1, 2017, 7:23:29 PM2/1/17
to rubyonra...@googlegroups.com
> On 2017-Feb-1, at 18:24 , Walter Lee Davis <wa...@wdstudio.com> wrote:
>
>> On Jan 31, 2017, at 10:55 PM, Joe Guerra <jgu...@jginfosys.com> wrote:
>>
>> ok, I solved of my problems. My git commit / push didn't work. Thats working now.
>>
>>
>> the other thing is...
>>
>> ActionView::Template::Error (PG::UndefinedColumn: ERROR: column "startdate" does not exist
>> 2017-02-01T03:51:33.326023+00:00 app[web.1]: LINE 1: SELECT "products".* FROM "products" ORDER BY Startdate ASC...
>> 2017-02-01T03:51:33.326023+00:00 app[web.1]: ^
>> 2017-02-01T03:51:33.326024+00:00 app[web.1]: HINT: Perhaps you meant to reference the column "products.Startdate".
>>
>> Startdate is a column in my database table, I don't know where it coming up with 'startdate' does not exist? I don't have that in any of my references.
>>
>> Thanks,
>> Joe
>>
>> On Tuesday, January 31, 2017 at 10:24:13 PM UTC-5, Joe Guerra wrote:
>> This is driving me crazy. I have my web app working great in development, then I commit and push it to Github and heroku automatically deploys my app.
>>
>> Unfortunately, it doesn't quite work out the same as the development.
>>
>> Pages aren't being found on production, but they are there in development and they are on my github repo.
>>
>> Heroku logs are not very useful either. :(
>>
>> Any suggestions?
>
> Are you using capital letters in your table names? You're going to have to do some extra work to get that to work, because the standard is lower-case table names. Some RDBMs don't care what case you use for table names, but some do.
>
> Walter

In particular, see https://blog.xojo.com/2016/09/28/about-postgresql-case-sensitivity/

-Rob

>
>>
>> Thanks,
>> Joe

Joe Guerra

unread,
Feb 1, 2017, 8:32:52 PM2/1/17
to Ruby on Rails: Talk
Hi, yes I had one column name I accidently capitalized.  It caused me so much grief.

I altered the table, and had to clean up my table column references in my code and all is well now.

Just a quick question.  I ran a migration that changed the column name on my local sqlite table, and when I tried the same migration on heroku it didn't change the table column name.  I used pgadmin 4 to alter the postgres table column name.

Thanks,
Joe
Reply all
Reply to author
Forward
0 new messages