草庐IT

Nginx--logrotate日志切割打包

全部标签

ruby-on-rails - Ruby On Rails 4.2 的可视化日志查看器

我以前在Laravel4上工作过,它有一个很棒的日志查看器工具laravellogviewer查看demo我正在寻找与Rubyonrails4.2非常相似的东西,如果你们知道Rails4.2的任何好的可视化日志记录GEM,请告诉我..从代码我需要记录不同的日志级别,这个工具应该直观地组织我的日志,谢谢.. 最佳答案 这应该可以帮助您入门https://github.com/shadabahmed/logstasher如其所说Thisgemisheavilyinspiredfromlograge,butit'sfocusedonone

ruby-on-rails - 我日志中的 [1m[35m] 是什么,我该如何让它消失?

如果这个问题已经得到回答,我提前道歉。我一直在尝试在Google和StackOverflow上搜索此内容,但由于我的搜索查询中包含标点符号,因此搜索引擎往往会对其进行修改并给出无意义的结果。在我的rails应用程序(rails3.2.11,ruby1.9.3)中,我的日志经常是这样的:StartedGET"/apply/contact"for127.0.0.1at2013-01-2917:35:21-0600ProcessingbyJobApplicationsController#showasHTMLParameters:{"id"=>"contact"}[1m[36mJobAppl

ruby-on-rails - 彪马/丢失的日志

为什么我在日志中看不到任何特定于Rails的条目?我在普通的Debian机器上使用带有Nginx代理的Puma2.7.1,没什么特别的,通过RVM的ruby​​1.9.3。我的美洲狮配置:#!/usr/bin/envpumaenvironment'sandbox'bind'unix://tmp/puma.sock'stdout_redirect'log/puma.log','log/puma_error.log',truepidfile'tmp/pids/puma.pid'state_path'tmp/pids/puma.state'daemonizetrueworkers4我通过以下

ruby-on-rails - ubuntu 14.04 上 passenger-install-nginx-module 的 Bundler 错误

我正在ubuntu14.04和ruby2.2.4上安装passenger+nginx。passenger-install-nginx-module有bundler错误$passenger-install-nginx-module/home/ubuntu/.rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/rubygems_ext.rb:45:in`full_gem_path':uninitializedconstantBundler::Plugin::API::Source(NameError)from/home/ubuntu/.r

nginx配置https后报错nginx: [emerg] https protocol requires SSL support in XXX.conf详细解决方法

一、前言最近,在测试环境的nginx里增加了一个https配置:location/api-meeting-qq/{proxy_passhttps://api.meeting.qq.com/;}然后,执行命令://这个是nginx启动文件的路径,根据实际情况自行更改sudo/home/useradmin/nginx/sbin/nginx-sreload结果,nginx就报错了:nginx:[emerg]httpsprotocolrequiresSSLsupportin/home/useradmin/nginx/conf.d/trainNginx.conf:9二、解决方法百度发现,是之前安装ngi

ruby-on-rails - Rails 日志文件 "not opened for writing"

我正在将我的应用程序从ruby​​1.8.7迁移到1.9.3(然后升级Rails)。但是我在登录1.9.3时遇到了一些问题。通过在控制台或服务器启动时在environment.rb中使用以下代码logfile=File.open(File.join(RAILS_ROOT,'/log/call_log.log'),'a')CALL_LOGGER=AuditLogger.new(logfile)CALL_LOGGER.info"CALL_LOGGER:Serverstarted."我明白了/usr/local/rvm/scripts/irbrc.rb:32:in`write':notope

ruby-on-rails - Rails 重定向在 nginx 和 gunicorn 设置上失败

我已经按照Railscasts第293集中的描述设置了在nginx和unicorn上运行。当我尝试重定向时,例如classPostsController"Testredirect"endend我被重定向到http://unicorn/posts而不是http://mydomain.com/posts这是我的应用程序的nginx.confupstreamunicorn{serverunix:/tmp/unicorn.scvrush.sockfail_timeout=0;}server{listen80defaultdeferred;#server_nameexample.com;root

ruby-on-rails - 日志 rails 控制台总是在生产环境中归档

您可能自己知道,有时您必须通过Rails控制台在实时生产机器上执行任务...我通常这样开始:bundleexecrailsconsole-eproduction但由于它是生产机器,我想将Rails控制台的所有输入和输出记录到一个文件中,例如到/home/sshuser/myproject/console_sessions/2016_09_09__14_33_33.txt有人知道怎么做吗?我想自动启动记录器,但前提是我运行控制台?(我正在运行Rails3.2)谢谢! 最佳答案 这是一个解决方案,整个系统只有一个文件,不修改Rails项

ruby - 来自 Thin 的消息/日志记录

如何阻止RackThin返回以下类型的初始消息?>>Thinwebserver(v1.3.1codenameTripleEspresso)>>Maximumconnectionssetto1024>>isteningon0.0.0.0:3000,CTRL+Ctostop我是这样使用它的:Rack::Handler::Thin.run(Rack::Builder.newdomap("/resource/"){run(Rack::File.new("/"))}map("/")dorun(->env{h=Rack::Utils.parse_nested_query(env["QUERY_ST

ruby - 如何为 Ubuntu 打包 Ruby 应用程序,包括它的 gem 依赖项?

我有一个名为Maid的命令行实用程序我目前分发为aRubyGem.我还想将其作为.deb包分发tomakeiteasierforUbuntuuserstoinstall.现在,Ubuntu用户必须手动完成很多工作,尤其是对于不熟悉Ruby的人:sudoapt-getinstallrubysudoapt-getinstallrubygems#Makesure`ruby`and`gem`arein`$PATH`sudogeminstallmaidmaidversion#examplecommand理想情况下,我希望在全新的Ubuntu安装上安装一个命令:sudoapt-getinstall