2012-11-06 58 views
1

我在我的Gemfile撬轨宝石。我想使用pry作为滑轨控制台,但没有下面的文字。如何在使用撬轨时清洁导轨控制台输出?

如何清洁我的rails控制台输出,现在我收到了很多不必要的文字:

>> Subscription.where(user_id: User.last.id) 
    User Load (1.8ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1 
#<ActiveRecord::Relation:0x7f7f9ad69c70 
    @implicit_readonly = nil, 
    @join_dependency = nil, 
    @order_clause = nil, 
    @records = [], 
    @should_eager_load = nil, 
    attr_accessor :bind_values = [], 
    attr_accessor :create_with_value = {}, 
... 

https://gist.github.com/4025796

+2

你是什么意思,“混乱”?这是撬,漂亮 - 打印返回值。 –

+0

我想你已经安装了'pry-rails' gem。删除它,只使用'pry' gem,它不应该覆盖默认的导轨控制台。 – louiscoquio

回答

3

根据你的表现结束了second Pry tip你可以使用分号。

>> Subscription.where(user_id: User.last.id); 
>>