代码拉取完成,页面将自动刷新
require 'rubygems'
require 'pry'
require 'pry/input_completer'
require 'thread'
require 'json'
require 'pry-rails/version'
pry_rails_path = Gem.loaded_specs['pry-rails']
class PryInput
def readline(prompt)
$stdout.print prompt
$stdout.flush
$stdin.readline
end
end
class PryOutput
def print(data="")
$stdout.puts(data.gsub('`', "'"))
$stdout.flush
end
end
Pry.config.input = PryInput.new()
Pry.config.output = PryOutput.new()
Pry.config.color = false
Pry.config.editor = ARGV[0]
Pry.config.auto_indent = false
Pry.config.correct_indent = false
port = ENV["SUBLIMEREPL_AC_PORT"].to_i
completer = Pry::InputCompleter.new(binding)
def read_netstring(s)
size = 0
while true
ch = s.recvfrom(1)[0]
if ch == ':'
break
end
size = size * 10 + ch.to_i
end
msg = ""
while size != 0
msg += s.recvfrom(size)[0]
size -= msg.length
end
ch = s.recvfrom(1)[0]
return msg
end
ENV['RAILS_ENV'] = "development"
#APP_PATH = File.expand_path('config/application')
require_relative('config/application')
#require APP_PATH
if Rails::VERSION::MAJOR >= 3
# class Rails::Console
# end
end
ARGV.unshift "console"
$: << File.join(pry_rails_path.full_gem_path, 'lib')
require 'pry-rails'
require 'rails/commands'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。