aws hosting error with ror - ruby-on-rails

I have hosted a ror app in aws ec2. Development env works fine but when i start production mode it says - "We're sorry, but something went wrong.We've been notified about this issue and we'll take a look at it shortly."
I chechked production.log
production.log
[2015-07-02T16:37:21.257777 #12834] INFO -- : Migrating to <Table Name> (20150608154559)
Like this all table name are shown with a migrating msg.
Is this is an error? How to resolve this ?

I tried running its production mode in localhost where it displayed the error was due to secret_key_base.

Related

Rails Atom Feed problems in production

I've setuped a atom feed in development on CodeAnyWhere with this url :
http://mydevsite.codeanyapp.com:3000/posts.atom ...and everything is ok
When i push it in production to heroku here :
http://myprodsite.heroku.com/posts.atom
...i've an error --> "We're sorry, but something went wrong.
If you are the application owner check the logs for more information.
I don't know where it comes :(((
Cheers!
There might be some exception on heroku
please check log by using command heroku logs from terminal. Resolved the issue and then again deploy it on heroku.

Rails: How to debug in production environment?

I've deployed to a VPS, but when visiting to my site, message shows:
We're sorry but something went wrong.
How could I start to debug?
I've deployed this commit successfully to heroku before. And before pushing to VPS, the site was running well.
I tried to see the log/production.log, but it only says Connecting to database specified by database.yml
Start with logs. Set more verbose log level to see what happens: set config.log_level = :debug in your config/environments/production.rb
More general, try something like errbit to see details about your production errors.

Cloned a RoR server and now getting "we're sorry, but something went wrong error"

I have a working RoR app that's running on Ubuntu Server, served by Nginx and Unicorn. It's using a local postgres database. I also think it's running on Sinatra instead of rails, but I'm too new to RoR to be able to say for certain.
I am attempting to create a development copy of the app to do some testing with. I'm able to do so using the source code, bundle install, and then running webbrick on my desktop. However, my developer wants to duplicate the environment that the actual production copy is running in. I cloned the server hosting the application, but when I browse to the server I get the dreaded "We're sorry, but something went wrong" error.
Here's what I've checked so for. I looked at the log files in the app/logs directory, and those haven't been updated in the last 6 days, so I suspect nothing relevant will be in them. If I run "service nginx status", it appears to be started. The database is running, and I can access it through the psql interface. Again, I'm pretty much an RoR newb... I was hoping one of you kind folks might give me some advice. Where should I look next? I'm sure it's something simple that I'm just overlooking. Thanks in advance!
In your config > environments > production.rb file change the consider_all_requests_local variable to true.
config.consider_all_requests_local = true
FYI, unicorn was not starting along with NGINX. I was able to script unicorn to start on boot, and this fixed my problem.

check 500 internal server error in production mode in rails 3.2

I have my app in production mode in my linode account and I get in one page a 500 internal server error the message:
We're sorry, but something went wrong.
However in my development environment works fine this page.
How can I debug this error?
How can I see the error origin in my production mode?
I want that rails show errors in production mode.
How can I do it?
Thank you!
If you have access to ssh, log in to your server via ssh and go to your rails log directory, which is inside your rails directory.
Once you are there run the command tail production.log . If this doesn't give you enough information you can also do a tail -n100 production.log (gives you last hundred lines of the production log).
If you have deployed via heroku, then you can access the logs by running heroku logs in your local console. (more information here https://devcenter.heroku.com/articles/logging)
I also find it helpful to use the exception_notification gem https://github.com/rails/exception_notification when running in production, as it emails you a stacktrace when an error occurs. Plenty of others also use Hoptoad (http://hoptoadapp.com/) or Exceptional (http://www.exceptional.io/) however i prefer the simple exception_notification gem.
Also, in some rare occasions when i can't trace the error as a final measure i sometimes open up port 3000 temporarily on the remote server firewall and cd to the rails project and run rails server production with the log level set to debug in config/environments/production.rb so i can see the error in the console, and then close off the port when i have finished.
Hope that helps.
tail -n100 production.log
will only show the last 100 lines of the log file. Just in case you want to see the log running in real time.
use this
tail -1000f log/production.log

Rails not booting, nothing in the logs

I just moved a working copy of a rails 3 app from a test server to a staging server.
I'm getting the standard error screen "We're sorry, but something went wrong."
However, my development.log file has nothing added to it (the migration logs went in fine).
I've doubled checked my settings, everything's fine.
If I make a dummy rails application it works as it should.
EDIT: I'm using Passenger on Ubuntu 10.10
I was under the impression that "We're sorry, but something went wrong." was used in the default production environment. Are the messages being logged to production.log?
As a note, I believe Passenger will launch the application in the production environment by default (as opposed to development environment).

Resources