在controller里加入binding.pry, then turn to the server terminal rails runner script/aaa.rb 转载于:https://www.cnblogs.com/iwangzheng/p/3791641.html