[英]AWS EC2 instance Rails 4 error on production but not on server
I am struggling to trouble shoot my app. 我正在努力解决我的应用的问题。 I am new to AWS EC2 and come from Heroku.
我是AWS EC2的新手,来自Heroku。 Generally I would use my "heroku logs --tail" console command to see why my app is erroring but on AWS I do not have that luxury (or at least know how).
通常,我会使用“ heroku logs --tail”控制台命令来查看为什么我的应用程序出错,但是在AWS上我没有那么奢侈(或者至少知道如何)。
To enter my production environment in the command line I... 要在命令行中进入生产环境,我...
...go to the folder where my example.pem is ...转到我的example.pem所在的文件夹
...type ssh -i example.pem ubuntu@55.555.55.555 ...类型ssh -i example.pem ubuntu@55.555.55.555
...type cd /etc/ ...输入cd / etc /
...type cd /etc/projects/myapp ...输入cd / etc / projects / myapp
and from there I can 从那里我可以
..."git pull origin master" to do my github pulls ...“ git pull origin master”做我的github pull
..."sudo service apache2 reload" to restart my server after a change ...“ sudo服务apache2重新加载”以在更改后重新启动我的服务器
...run "rails s" to see the logs on the local server. ...运行“ rails s”以查看本地服务器上的日志。
The error does not happen when on "rails s" 55.555.55.555:3000 it only errors on live production 55.555.55.555. 在“ rails s” 55.555.55.555:3000上不会发生该错误,它仅在实时生产55.555.55.555上会出错。
How can I troubleshoot or at least see the production logs? 如何排除故障或至少查看生产日志?
使用(在Rails应用程序目录内部):
tail -f log/production.log
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.