Pry in SublimeREPL

Has anyone managed to use swapping irb out for pry in SublimeREPL? I think I'm close. I do not receive an error message, but I do not receive a response when I enter the command. It behaves the same as a reset buffer every time I press return.


I use rbenv and installed my SublimeREPL PATH as follows:

"default_extend_env": {"PATH": "{HOME}/.rbenv/bin:{HOME}/.rbenv/shims:{PATH}"} 
+6
source share
3 answers

Try adding Pry.config.auto_indent = false to .pryrc

+1
source

Besides setting PATH in default_extend_env, you should also set GEMPATH. Here is my SublimeREPL parameter:

 { "default_extend_env": { "PATH": "{HOME}/.rbenv/shims:{PATH}", "GEM_PATH": "{HOME}/.rbenv/shims"} } 

You can add the following code at the beginning of pry_repl.py to print PATH to check if your setting is valid.

 puts "PATH:#{ENV['PATH']}" puts "GEM_PATH:#{ENV['GEM_PATH']}" 
0
source

I am using RVM and Ruby 2.1.2. I changed / Users / [my name] / Library / Application Support / Sublime Text 3 / Packages / User / SublimeREPL.sublime-settings for:

 default_extend_env": { "PATH": "/usr/local/bin/:{PATH}", "GEM_PATH": "{HOME}/.rvm/gems/ruby-2.1.2/" } 

To get your GEM_PATH, enter gem env and enter the path from "INSTALLING THE DIRECTORY:" or go to the directory and enter ENV['GEM_PATH']

0
source

Source: https://habr.com/ru/post/919413/


All Articles