Pry可看成是IRB的加强版。支持语法高亮等特点。
1、在Gemfile中添加:
[quote]group :development do
gem 'pry'
end[/quote]
运行bundle install。
2、在config/environments/development.r文件最后面添加:
[quote]silence_warnings do
require "pry"
IRB = Pry
end[/quote]
保存即可。
运行rails console进入pry终端。
pry项目地址:[url]https://github.com/pry/pry[/url]
1、在Gemfile中添加:
[quote]group :development do
gem 'pry'
end[/quote]
运行bundle install。
2、在config/environments/development.r文件最后面添加:
[quote]silence_warnings do
require "pry"
IRB = Pry
end[/quote]
保存即可。
运行rails console进入pry终端。
pry项目地址:[url]https://github.com/pry/pry[/url]