Tweetegy On the edge of chaos with Blockchain, Dapps, DeFi, JavaScript

| About | Search | Archive | Github | RSS |

Why is Bundler in Rails 3 so slow?

Actually, the title of this post is mis-leading a little so blame Google for bringing you here if this is not what you wanted!

What I will do is tell you this – Bundler is really slow on my machine! It takes more than 40 minutes to install just a single gem! I have heard other complaints around the web-sphere but nowhere near as long as I have to wait (usually I find most people who have slow Bundler experience wait more than 3 minutes on average). OK, so I am not going to tell you why this is happening, but I will tell you a work around.

Instead of running:

bundle install

…run it with the –local switch instead as follows:

bundle install --local

If you want to install a new Gem, lets say, mongo_mapper, then add to your application Gemfile:

1
gem 'mongo_mapper'

…and here’s the important part, install it the old fashioned way, using gem install and then run bundle install --local

1
2
gem install mongo_mapper --no-rdoc --no-ri
bundle install --local

Note that I pass the –no-rdoc and –no-ri switch to gem install to make that a little (sometimes a lot) faster too. Now you can get back to building that app! Good luck!