我尝试使用derailed_benchmarks
gem调试我的rails应用程序。我按照Github的说明进行操作。我可以在生产中本地运行我的服务器,但是当我尝试执行命令derailed exec perf:mem_over_time
时,我收到以下错误:
/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/lib/derailed_benchmarks/tasks.rb:92:in `call_app': Bad request: <html><body>You are being <a href="http://example.org/user_sessions/new">redirected</a>.</body></html> (RuntimeError)
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/lib/derailed_benchmarks/tasks.rb:145:in `block (2 levels) in <top (required)>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
from /Users/cowan/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/bin/derailed:41:in `exec'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/bin/derailed:85:in `<top (required)>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/derailed:23:in `load'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/derailed:23:in `<main>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
非常感谢任何帮助。
答案 0 :(得分:5)
我的应用程序使用puma,所以我必须在运行命令时指定。
$ USE_SERVER=puma derailed exec perf:mem_over_time