Skip to content

Instantly share code, notes, and snippets.

@rockrep
Created April 3, 2012 23:55
Show Gist options
  • Save rockrep/2296458 to your computer and use it in GitHub Desktop.
Save rockrep/2296458 to your computer and use it in GitHub Desktop.
gem vs bundle exec environment differences
require "bundler/capistrano"
require "rvm/capistrano"
set :rvm_ruby_string, "ruby-1.9.2-p290"
set :bundle_dir, '/usr/local/rvm/gems/ruby-1.9.2-p290'
Capistrano then executes this command:
bundle install --gemfile /home/deploy/rails_app/releases/20120403233447/Gemfile --path /usr/local/rvm/gems/ruby-1.9.2-p290 --deployment --quiet --without development test"
$ rvm list
rvm rubies
=* ruby-1.9.2-p290 [ x86_64 ]
# => - current
# =* - current && default
# * - default
[deploy@staging01 current]$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.21
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.2-p290
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-1.9.2-p290/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-1.9.2-p290
- /usr/local/rvm/gems/ruby-1.9.2-p290@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
[deploy@staging01 current]$ bundle exec gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.21
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.2-p290/ruby/1.9.1
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-1.9.2-p290/ruby/1.9.1/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-1.9.2-p290/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment