New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ruby Pry helper for Pry version >= 0.10.0. #372

Merged
merged 1 commit into from Jan 27, 2017

Conversation

Projects
None yet
@smiler
Copy link

smiler commented Aug 18, 2014

This should fix issue #336 but will break older versions of Pry.

@cristim

This comment has been minimized.

Copy link

cristim commented Sep 3, 2014

@wuub could we have this merged please?

@korsnes

This comment has been minimized.

Copy link

korsnes commented on 95ffe15 Sep 28, 2014

This lets you start the Pry REPL, but breaks transfer from source buffers for Ruby.

Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 543, in run_
return self.run(edit, **args)
File "C:\Users\Erik\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\text_transfer.py", line 123, in run
for rv in manager.find_repl(external_id):
File "C:\Users\Erik\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\sublimerepl.py", line 437, in find_repl
if not (rv.repl and rv.repl.is_alive()):
File "C:\Users\Erik\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\repls\subprocess_repl.py", line 185, in is_alive
return self.popen.poll() is None
File "./subprocess.py", line 938, in poll
File "./subprocess.py", line 1153, in _internal_poll
OSError: [WinError 6] The handle is invalid

This comment has been minimized.

Copy link

mooreniemi replied Oct 11, 2014

@korsnes I was able to use this fix to run pry REPL and use command+,+s etc to transfer from files (is this what you mean by source buffers?) into the REPL. I'm on OS X Mavericks, fwiw.

This comment has been minimized.

Copy link

gretel replied Oct 31, 2014

works fine for me. please merge 🔹

This comment has been minimized.

Copy link

iamcolonelreb replied Nov 8, 2014

worked solid for me too, I haven't found any issues since making these changes to my pry_repl.rb

This comment has been minimized.

Copy link

jastuccio replied Jan 9, 2015

This fixed my sublimeREPL issue too! :D

I'm new to OSS. Why isn't this merged? Does it break something else for non-OSX users?

This comment has been minimized.

Copy link

rayning0 replied Jan 11, 2015

I spent hours trying to figure out why SublimeREPL could not find Pry when I tried to use it with Ruby. These fixes solved my problem! However, they have not been MERGED into main branch, so everyone who installed this package into Sublime Text will have the same errors. Please MERGE!

This comment has been minimized.

Copy link

adback03 replied Apr 23, 2015

This also fixed my issue.

This comment has been minimized.

Copy link

gerrywastaken replied May 10, 2015

Good fix 👍

This comment has been minimized.

Copy link

rmangino replied Aug 7, 2015

I applied the proposed changes to both:

*/Sublime Text 2/Packages/SublimeREPL/config/Ruby/pry_repl.rb
*/Sublime Text 2/Packages/SublimeREPL/config/Rails/pry_repl.rb

and now both REPLs work perfectly for me in ST 2. This really needs to be merged.

@AGS-Knight

This comment has been minimized.

Copy link

AGS-Knight commented Nov 12, 2014

While these change now allow me to run SublimeREPL for pry (0.10.1), I have no prompt visible until after I press return, where it echos the proper prompt and my text, then advances a newline.

@korsnes

This comment has been minimized.

Copy link

korsnes commented on 95ffe15 Sep 28, 2014

This lets you start the Pry REPL, but breaks transfer from source buffers for Ruby.

Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 543, in run_
return self.run(edit, **args)
File "C:\Users\Erik\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\text_transfer.py", line 123, in run
for rv in manager.find_repl(external_id):
File "C:\Users\Erik\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\sublimerepl.py", line 437, in find_repl
if not (rv.repl and rv.repl.is_alive()):
File "C:\Users\Erik\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\repls\subprocess_repl.py", line 185, in is_alive
return self.popen.poll() is None
File "./subprocess.py", line 938, in poll
File "./subprocess.py", line 1153, in _internal_poll
OSError: [WinError 6] The handle is invalid

This comment has been minimized.

Copy link

mooreniemi replied Oct 11, 2014

@korsnes I was able to use this fix to run pry REPL and use command+,+s etc to transfer from files (is this what you mean by source buffers?) into the REPL. I'm on OS X Mavericks, fwiw.

This comment has been minimized.

Copy link

gretel replied Oct 31, 2014

works fine for me. please merge 🔹

This comment has been minimized.

Copy link

iamcolonelreb replied Nov 8, 2014

worked solid for me too, I haven't found any issues since making these changes to my pry_repl.rb

This comment has been minimized.

Copy link

jastuccio replied Jan 9, 2015

This fixed my sublimeREPL issue too! :D

I'm new to OSS. Why isn't this merged? Does it break something else for non-OSX users?

This comment has been minimized.

Copy link

rayning0 replied Jan 11, 2015

I spent hours trying to figure out why SublimeREPL could not find Pry when I tried to use it with Ruby. These fixes solved my problem! However, they have not been MERGED into main branch, so everyone who installed this package into Sublime Text will have the same errors. Please MERGE!

This comment has been minimized.

Copy link

adback03 replied Apr 23, 2015

This also fixed my issue.

This comment has been minimized.

Copy link

gerrywastaken replied May 10, 2015

Good fix 👍

This comment has been minimized.

Copy link

rmangino replied Aug 7, 2015

I applied the proposed changes to both:

*/Sublime Text 2/Packages/SublimeREPL/config/Ruby/pry_repl.rb
*/Sublime Text 2/Packages/SublimeREPL/config/Rails/pry_repl.rb

and now both REPLs work perfectly for me in ST 2. This really needs to be merged.

@madstap

This comment has been minimized.

Copy link

madstap commented Apr 23, 2015

I'll just add my voice as well in saying 'please merge!'.

@alkuzad

This comment has been minimized.

Copy link

alkuzad commented May 15, 2015

This does not work with pry-coolline (not needed but I had it in my gems). Output is mangled and returns slowly:

capture

@dkarter

This comment has been minimized.

Copy link

dkarter commented May 20, 2015

tested it by changing my local pry_repl.rb and it worked perfectly.
Please merge! 👍

@bb

This comment has been minimized.

Copy link

bb commented May 29, 2015

Please merge! +1

@@ -1,6 +1,7 @@
require 'rubygems'
gem 'pry'

This comment has been minimized.

@hardywu

hardywu May 31, 2015

Why not just use gem 'pry', '=0.9.12.6'?

This comment has been minimized.

@bb

bb May 31, 2015

Because there are bunch of fixes and new features in the latest version? See https://github.com/pry/pry/blob/master/CHANGELOG.md

Why force people to use old versions when newer stable versions are available for several months already?

This comment has been minimized.

@hardywu

This comment has been minimized.

@Syzygies

Syzygies Oct 25, 2017

Packages/SublimeREPL/config/Ruby/pry_repl.rb:37:in `main': uninitialized constant Pry::InputCompleter (NameError)
Did you mean? Pry::InputLock

As of Oct 25, 2017, the file pry_repl.rb in the current distribution of SublimeREPL (as installed by Package Control today) has not been edited since Mar 14, 2013.

In particular, these changes have not been made. If you are reading this because you Googled the quoted error after being unable to get SublimeREPL to work with Ruby, then make these changes manually to your copy.

This comment has been minimized.

@titusjohnson

titusjohnson Sep 7, 2018

September 7, 2018, the above is still true. Apply these changes to config/Ruby/pry_repl.rb and config/Rails/pry_repl.rb locally and this package will work. Tested with Rails 5.2.1 and Ruby 2.5.1.

@hardywu

This comment has been minimized.

Copy link

hardywu commented May 31, 2015

config/Rails/pry_repl.rb should also be fixed.

@mickey

This comment has been minimized.

Copy link

mickey commented Dec 10, 2015

I confirm this fixes the rails repl 👍

@coderberry

This comment has been minimized.

Copy link

coderberry commented Jan 28, 2016

👍 please merge

@gretel

This comment has been minimized.

Copy link

gretel commented May 7, 2016

guess a good fork is required to have this long-standing issue resolved. who's up?

@alkuzad

This comment has been minimized.

Copy link

alkuzad commented May 7, 2016

@gretel it's PR so it's already on fork.

@kevce392

This comment has been minimized.

Copy link

kevce392 commented Sep 10, 2016

merge!

1 similar comment
@crowdy

This comment has been minimized.

Copy link

crowdy commented Sep 12, 2016

merge!

@aminfara

This comment has been minimized.

Copy link

aminfara commented Oct 26, 2016

please merge! 😐

@JoelSanchez

This comment has been minimized.

Copy link
Collaborator

JoelSanchez commented Jan 27, 2017

Trusting the community here regarding this PR, and merging on merge branch

@JoelSanchez JoelSanchez changed the base branch from master to merges Jan 27, 2017

@JoelSanchez JoelSanchez merged commit 3bf138f into wuub:merges Jan 27, 2017

@cseder

This comment has been minimized.

Copy link

cseder commented Apr 9, 2018

Why isn't this merged and available in new versions of SublimeRepl??
Every time I install ST and SublimeRepl on a new computer I have to go through with this fix...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment