Debug: Heroku Error but no error on local - ruby-on-rails

My app is working locally, however, for some reason part of the app isn't working on Heroku. I have checked the heroku logs --tail, however, there aren't any errors appearing. It's just showing the default 404 page.
Are there any options to debug this issue?

It looked like CarrierWave couldn't handle one of the files being uploaded. Perhaps it was too big? Thus, I deleted one of the latest records added to the table.

Related

EOFError (end of file reached)

I am not really sure what is going on with my rails app. I have not changed any code on my front page but I am getting the error EOFError (end of file reached) with no further information on the logs.
It is only the index page that has this issue. I would like to know, if there is any other way I can get more information on this error.
This is all I have from papertrail
Edit: In localhost everything works fine but once I have deployed to Heroku my frontpage does not work.
After a back and forth with Heroku, my issue ended up being resolved. There was no error in the code as this piece of code had been working all along. Heroku advised that maintenance occurs every night and maybe the moving of the app to a different dyno might have resolved the issue.
If anyone else ends up with a similar issue, if a restart does not fix it maybe ask Heroku to move you to a different dyno.

Rails form doesn't show up on heroku

I have a Rails app on Heroku with a couple of forms on it. They show up fine locally, but on heroku, my form doesn't show up at all. I know my database is being accessed, because I have a greeting message with a user's name at the top of the page that's displayed fine.
Has anyone run into this issue and had any luck solving it?
Try to run your app locally on production environment and check is your form show up properly.

Reset database causes heroku custom domain to issue 404

I added a custom domain to my heroku app sometime last week and its been pointing well up until this last night.
A huge error made me reset my database using the heroku pg:reset DATABASE_URL command.
Since then, attempts to visit my app from the custom domain issues a 404, page not found error.
However, when I visit the app directly through its heroku domain name, it works without issues.
I've tried restarting the server, re-adding the domain name even after confirming its there (using heroku domains).
I'd be glad if anyone could help with this error. Thanks.

Rails 4 Heroku - changes not getting pushed?

I am using Heroku to try to deploy a personal Ruby on Rails project and everything was going great until today.
I am very very new to Ruby on Rails and Heroku so please bare that in mind. I am not sure what is causing my issue and therefore not sure what code or information is best to supply so please ask me what you think you need to know to help resolve the issue and I will provide it.
My Ruby on Rails app worked fine both locally and on Heroku until I followed the information here to try and serve static images from Amazons S3 bucket. Note I only went as far as the static assets section.
This appeared to stop my Ruby on Rails application from recognising changes in my code. So I would make a change to a HTML file in my editor but the server was serving up the older version of the HTML file, even restarting the server didn't fix this.
I have been searching the web for hours trying to figure out what has gone wrong.
I deleted everything under public assets and I ran the precompile command:
rake assets:precompile
And this seems to have improved things locally, when I edit a HTML file the changes are reflected on localhost. However when I push to Heroku and go to my application hosted on Heroku it still shows the older HTML file no matter how many changes I make and pushes I do to Heroku.
The HTML files that are not updating are located here:
app/assets/templates
I'm not sure what I may have changed that has caused the HTML files not to get updated on Heroku?? What should I look at and try? What other information would be useful in helping track down the issue?
The answer marked as correct in this StackOverflow question worked for me - Updated CSS Stylesheet not loaded following deployment to Heroku? - It looks like I accidently added assets precompiled file in my git repo somewhere along my development and that caused the issue.

How can I prevent cache/cookies from affecting the path of ckeditor javascript files in a production rails app?

I have a built a rails app in which I am using the ckeditor 3.5.1 together with the ckeditor gem.
When running in development, everything works fine. But when I run in production, I get errors.Sometimes, the text_area with the ckeditor does not show up. But when I clear my cache and cookies, everything works fine. Then after a while, the error comes up again. The error comes up more often than not.
Closer investigation reveals that when the error occurs, some files like staging.domain.com/javascripts/ckeditor/config.js are instead being requested from staging.domain.com/posts/config.js which is naturally non-existent
(posts is from my Post model)
How can the cache/cookies affect which path the files are served from?
Does anyone know what else might be wrong and how I can fix it?
P.S. I am using Phusion passenger in production.
It would seem the problem was being cased by mod_pagespeed which was activated. By disabling it, everything came back to normal.
I am curious though, about how this was happening.

Resources