我总是使用 'y' 方法在我的 rails 控制台中清理我的结果。但是,它似乎不再起作用了。
我有结果要找到,我可以查看结果,但不是以干净的方式。这是我的 Rails 控制台:
Loading development environment (Rails 3.2.6)
1.9.3-p286 :001 > y Trip.all
Trip Load (0.1ms) SELECT "trips".* FROM "trips"
NoMethodError: undefined method `y' for main:Object
from (irb):1
from /home/timen/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.6/lib/rails/commands/console.rb:47:in `start'
from /home/timen/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.6/lib/rails/commands/console.rb:8:in `start'
from /home/timen/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.6/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
1.9.3-p286 :002 >