February 2012
3 posts
An idea about asset pipeline
Rails 3 way Usually we structure our Rails 3+ assets like this: app assets stylesheets global.css comments.css posts.css javascripts global.js comments.js posts.js views comments ... posts ... comments.js and comments.css are specific for comments controller and its views. Keeping controller specific assets in the views...
Feb 25th
4 tags
Speeding up RSpec test suite: Tip #3
Assuming you are using ruby 1.9.3-p0 at the moment, then I suggest applying funny-falcon patch (https://gist.github.com/1688857). This made my rails start up faster and also the overall runtime. This is also included in the RVM. To install it, just run: rvm get head rvm install 1.9.3-falcon rvm use 1.9.3-falcon I also suggest adding following to your shell rc file (bonus section from the gist)....
Feb 11th
3 tags
Speeding up RSpec test suite: Tip #2
Got lots of RAM? Disable GC. I have this snippet in my spec_helper.rb if ENV["RUBY_DISABLE_GC_FOR_SPECS"] config.before(:suite) do puts "GC disabled" GC.disable end end And in my shell rc file I have: export RUBY_DISABLE_GC_FOR_SPECS="true" Warning: If you have many selenium tests, then do not disable it completely. You’ll just run out of RAM.
Feb 11th