简体   繁体   English

生产上的AWS EC2实例Rails 4错误但服务器上没有

[英]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.

相关问题 使用Capistrano部署后,无法在运行Puma 3.6的AWS EC2实例的生产环境中访问Rails 5 App - Can't access the Rails 5 App in production on AWS EC2 instance running Puma 3.6 after deployment with Capistrano 在AWS EC2实例中为生产中的静态资产提供服务 - serving static assets in production in aws ec2 instance 带有ELB for RAILS服务器SSL的AWS EC2实例可以运行,但是社交登录失败 - AWS EC2 instance with ELB for RAILS server SSL works but fail social login 将Ruby on Rails项目从github上传到AWS EC2实例错误 - Uploading Ruby on Rails project from github to AWS EC2 instance error AWS ElasticBeanstalk Rails App上的EC2 rake实例 - EC2 rake instance on AWS ElasticBeanstalk Rails App 在EC2 AWS实例上仅运行Puma时使用Rails SSL - Rails SSL while running only Puma on EC2 AWS instance 在 ec2 实例上未在生产中提供公共/包中的 rails 预编译资产 - rails precompiled assets in public/packs not being served in production on ec2 instance 无法在 AWS EC2 实例上启动 sidekiq - Unable to start sidekiq on AWS EC2 instance Rails:如何在生产服务器(EC2 Ubuntu)上正确设置时区? - Rails: How to properly set up the timezone on the production server (EC2 Ubuntu)? 在EC2实例上更新Rails应用 - update rails app on EC2 instance
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM