Last Updated: February 25, 2016
· boddhisattva

Use "bundle pack" to setup your Rails project behind a proxy in an office box - a work around that does it's job for you atleast until you have all the required access

When you're behind a proxy, especially in an "Enterprise company'(please don't take this literally as applicable for every Enterprise company/MNC. I'm sure they have their own valid reasons for setting up such restrictions in the first case and this article is not to debate on that in anyway whatsoever. I'm just sharing my personal experience to help you get going from as early as possibly you can..), say at least during your starter days you might not have complete internet access or at least that much that you may require for going about day to day Rails development.

In such scenarios, for you to run an existing project which say you've hosted on Github/Gitlab etc., would be challenging as you would not have those gems in your local box to get your app up an running.

A work around for this is from your home system or wherever you generally work out of where you don't have such internet restrictions, with respect to your existing Rails project what you can do is do a bundle pack. What this command does it copies all your gems to the vendor/cache directory of your project.

So assuming you atleast have cloning access from where you work, what you can now do easily is-

i. git clone project_url

ii. cd project_directory

iii. bundle install --local

And, you should be up and running.. :)