If you can run the following command and get the following result:
$ bundle check
The Gemfile's dependencies are satisfied
You can run the bundle package
command and still deploy your project without needing to touch RubyGems.org (perhaps stick in 127.0.0.1 in your hosts file if you're still concerned):
$ bundle package
Using rake (0.9.2.2)
Using addressable (2.3.2)
Using ffi (1.2.0)
Using childprocess (0.3.6)
Using builder (3.1.4)
Using diff-lcs (1.1.3)
Using json (1.7.6)
Using gherkin (2.11.5)
Using cucumber (1.2.1)
Using rspec-expectations (2.12.0)
Using aruba (0.5.1)
Using awesome_print (1.1.0)
Using bundler (1.2.3)
Using mime-types (1.19)
Using nokogiri (1.5.5)
Using rack (1.4.1)
Using rack-test (0.6.2)
Using websocket (1.0.4)
Using libwebsocket (0.1.7.1)
Using multi_json (1.4.0)
Using rubyzip (0.9.9)
Using selenium-webdriver (2.26.0)
Using xpath (1.0.0)
Using capybara (2.0.1)
Using colorize (0.5.8)
Using crack (0.3.1)
Using gli (2.5.4)
Using gem_grepper (0.0.1) from source at .
Using gherkin-ruby (0.2.1)
Using rdoc (3.12)
Using rspec-core (2.12.1)
Using rspec-mocks (2.12.0)
Using rspec (2.12.0)
Using spinach (0.6.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Updating files in vendor/cache
* rake-0.9.2.2.gem
* addressable-2.3.2.gem
* ffi-1.2.0.gem
* childprocess-0.3.6.gem
* builder-3.1.4.gem
* diff-lcs-1.1.3.gem
* json-1.7.6.gem
* gherkin-2.11.5.gem
* cucumber-1.2.1.gem
* rspec-expectations-2.12.0.gem
* aruba-0.5.1.gem
* awesome_print-1.1.0.gem
* mime-types-1.19.gem
* nokogiri-1.5.5.gem
* rack-1.4.1.gem
* rack-test-0.6.2.gem
* websocket-1.0.4.gem
* libwebsocket-0.1.7.1.gem
* multi_json-1.4.0.gem
* rubyzip-0.9.9.gem
* selenium-webdriver-2.26.0.gem
* xpath-1.0.0.gem
* capybara-2.0.1.gem
* colorize-0.5.8.gem
* crack-0.3.1.gem
* gli-2.5.4.gem
* gherkin-ruby-0.2.1.gem
* rdoc-3.12.gem
* rspec-core-2.12.1.gem
* rspec-mocks-2.12.0.gem
* rspec-2.12.0.gem
* spinach-0.6.0.gem
After that you can modify your deploy scripts to use Bundler's local install which bypasses RubyGems.org completely:
$ bundle install --local
#OR for production deployments:
$ bundle install --local --without development test
The default Bundler's deployment hook runs the following (thanks to @indirect for the refresher):
$ bundle install --path vendor/bundle --without development test --frozen
Because of this you're manually telling it not to look at rubygems.org and should be safe to go with that as well. I'm fairly certain the above command is the same as:
$ bundle install --deployment
Hopefully all of the above should be safe for you to use as methods to deploy in your scripts until rubygems.org is fully available again (which seems like it'll be sooner rather than later).
If bundle check
isn't fully successful you can try seeing if you have the gems locally by running the following on your develpment machine:
# Find all gems in your home folder (faster)
$ find ~ -name *.gem
# Find a specific gem in your home folder if you know part of the name (cleaner results)
$ find ~ -name <partial_gem_name>*.gem
# The same commands can be done for your whole system with:
$ find / -name *.gem
$ find / -name <partial_gem_name>*.gem
# Once you find the gem's location, install it from the root of your app:
$ cd <your_app>
# The -l flag restricts all operations to the local system and bypasses rubygems.org:
$ gem install -l <path_to_your_gem>/<gem_name>-<gem_version>.gem
Once you've got all the gems accessible and made bundle check
happy you should be able to safely run bundle package
and update your deploy scripts as described above.
Check out
cap -e bundle:install
for the docs on how to customize capistrano's bundling task. To simply add--local
to the flags passed to bundle install, insert this line intodeploy.rb
, after the linerequire 'bundler/capistrano'
: