Rails 3 - Speed up Console Loading Time

后端 未结 6 1730
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-02 07:55

I am wondering if there is any relatively easy way to speed up my console load time, which is starting to approach 30 seconds. I have a lot of subclasses whose methods don\

6条回答
  •  误落风尘
    2020-12-02 08:31

    You can speed it up by adding :require => nil to the slow Gemfile entries and require them manually. e.g.

    gem 'jammit', :require => nil
    

    I also addressed this issue in a meetup i've had. This seems to be a bug in ruby 1.9.2 (see comments of this patch: https://gist.github.com/1008945)

    You can fix it by patching your 1.9.2 by the gist i just linked or upgrading to 1.9.2-head or 1.9.3-head.

提交回复
热议问题