问题描述
问题:
在另一个分支升级到 Rails 4 并尝试上次有效的解决方案后
编辑 1:
所以按照建议的帖子(
编辑 3:
Pry-Byebug 问题已创建:https://github.com/deivid-rodriguez/pry-byebug/issues/78
编辑 4:将此帖子拆分为Pry Remote/ByeBug 接下来进入拆解 因为我认为这个问题更多地与 ByeBug 相关,而不是 Pry-remote.
Try pry-byebug
with 版本1.3.3
.pry-byebug
作者似乎对他的项目失去了兴趣,因此您可能需要降级到较旧但更稳定的版本.我会做以下事情:
# 从 Gemfile 中移除 pry,它将被 pry-byebug 的依赖显式加载# gem '撬'宝石'撬-再见','= 1.3.3'宝石'撬堆栈_资源管理器'宝石撬轨"宝石'撬遥控'# 也删除 `byebug`,它可能会给出比 pry-byebug 需要的更高版本的 byebug# gem '再见'
现在运行bundle install
.之后尝试干净地启动 pow
,即重新启动/终止所有 spring
和 pow
进程.
$ spring stop #优雅的spring stop$ ps ax |grep '[s]pring' |awk '{ 打印 $1 }' |xargs kill -9 # 强制 spring 退出$ touch ~/.pow/restart.txt # 重启 pow
Problem:
After upgrading to Rails 4 in another branch and trying the solution that worked last time Pry-Remote with Pow on Rails 4 . I'm still finding difficulty with the new Rails 4 and Pry Debugger.
What's I'm running:
rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
Rails 4.2.4
Pry version 0.10.2 on Ruby 2.2.3
# Debugging
gem 'pry'
gem 'pry-byebug'
gem 'pry-stack_explorer'
gem 'pry-rails'
gem 'pry-remote'
gem 'byebug'
pry (0.10.2)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.2.0)
byebug (~> 5.0)
pry (~> 0.10)
pry-rails (0.3.4)
pry (>= 0.9.10)
pry-remote (0.1.8)
pry (~> 0.9)
slop (~> 3.0)
pry-stack_explorer (0.4.9.2)
binding_of_caller (>= 0.7)
pry (>= 0.9.11)
Mac OS X 10.10.5 (14F27)
Latest version from Pow
Symptoms:
Putting binding.remote_pry in the code the code is halting but unable to go into the debugger. Debugger stays "loading" after I type pry-remote.
First pry-remote: Debugger not ready.
Second pry-remote: No answer
Third pry-remote: Keeps loading without output
Fourth pry-remote: Output when CTRL + C
EDIT 1:
So following the suggested post ( https://github.com/Mon-Ouie/pry-remote/issues/8 ).
I've done and tried the following:
Created .prv file with:
Pry.config.correct_indent = false
Pry.config.auto_indent = false
Added "require 'pry-remote'" to main.rb
Not running Unicorn or Nginx, so no need to update those
Updated Gemfile to
gem "pry-remote", :require => "pry-remote"
So with all these things done, still no difference.
Edit 2:
With the help of Alexey Shein, I have moved a step further. Now he goes into the debugger but I can't use next
and step
.
Edit 3:
Pry-Byebug Issue created: https://github.com/deivid-rodriguez/pry-byebug/issues/78
Edit 4:Split this post into Pry Remote / ByeBug next goes into Teardown because I think this issue is more related to ByeBug then Pry-remote.
Try pry-byebug
with version 1.3.3
. It seems pry-byebug
author lost interest to his project, so you may need to downgrade to an older but more stable version. I'd do the following:
# remove pry from Gemfile, it will be explicitly loaded by dependency of pry-byebug
# gem 'pry'
gem 'pry-byebug', '=1.3.3'
gem 'pry-stack_explorer'
gem 'pry-rails'
gem 'pry-remote'
# remove also `byebug`, it may give too high version of byebug than needed by pry-byebug
# gem 'byebug'
Now run bundle install
. After that try to start pow
cleanly, i.e. restart/kill all spring
and pow
processes.
$ spring stop # graceful spring stop
$ ps ax | grep '[s]pring' | awk '{ print $1 }' | xargs kill -9 # force spring to quit
$ touch ~/.pow/restart.txt # restart pow
这篇关于Pry-Remote 未触发 Rails 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!