File: bundle-exec [bundler-1.10.3 Documentation]

### Home Classes Methods

### Files

- bundle
- bundle-config
- bundle-config.txt
- bundle-exec
- bundle-exec.txt
- bundle-install
- bundle-install.txt
- bundle-package
- bundle-package.txt
- bundle-platform
- bundle-platform.txt
- bundle-update
- bundle-update.txt
- bundle.txt
- gemfile.5.txt
- Executable
- Gemfile

### Class Index

Quicksearch

- Bundler
- Bundler::BundlerError
- Bundler::CLI
- Bundler::CLI::Binstubs
- Bundler::CLI::Cache
- Bundler::CLI::Check
- Bundler::CLI::Clean
- Bundler::CLI::Common
- Bundler::CLI::Config
- Bundler::CLI::Console
- Bundler::CLI::Exec
- Bundler::CLI::Gem
- Bundler::CLI::Init
- Bundler::CLI::Inject
- Bundler::CLI::Install
- Bundler::CLI::Lock
- Bundler::CLI::Open
- Bundler::CLI::Outdated
- Bundler::CLI::Package
- Bundler::CLI::Platform
- Bundler::CLI::Show
- Bundler::CLI::Update
- Bundler::CLI::Viz
- Bundler::CurrentRuby
- Bundler::CyclicDependencyError
- Bundler::Definition
- Bundler::DepProxy
- Bundler::Dependency
- Bundler::Deployment
- Bundler::Deprecate
- Bundler::DeprecatedError
- Bundler::Dsl
- Bundler::Dsl::DSLError
- Bundler::EndpointSpecification
- Bundler::Env
- Bundler::Environment
- Bundler::Fetcher
- Bundler::Fetcher::AuthenticationRequiredError
- Bundler::Fetcher::BadAuthenticationError
- Bundler::Fetcher::Base
- Bundler::Fetcher::CertificateFailureError
- Bundler::Fetcher::Dependency
- Bundler::Fetcher::Downloader
- Bundler::Fetcher::FallbackError
- Bundler::Fetcher::Index
- Bundler::Fetcher::NetworkDownError
- Bundler::Fetcher::SSLError
- Bundler::GemHelper
- Bundler::GemHelpers
- Bundler::GemInstaller
- Bundler::GemNotFound
- Bundler::GemfileError
- Bundler::GemfileLockNotFound
- Bundler::GemfileNotFound
- Bundler::GemspecError
- Bundler::GitError
- Bundler::Graph
- Bundler::Graph::GraphVizClient
- Bundler::HTTPError
- Bundler::Index
- Bundler::Injector
- Bundler::InstallError
- Bundler::InstallHookError
- Bundler::Installer
- Bundler::InvalidOption
- Bundler::LazySpecification
- Bundler::LockfileError
- Bundler::LockfileParser
- Bundler::MarshalError
- Bundler::MatchPlatform
- Bundler::Molinillo
- Bundler::Molinillo::CircularDependencyError
- Bundler::Molinillo::DependencyGraph
- Bundler::Molinillo::DependencyGraph::Vertex
- Bundler::Molinillo::DependencyState
- Bundler::Molinillo::NoSuchDependencyError
- Bundler::Molinillo::PossibilityState
- Bundler::Molinillo::Resolver
- Bundler::Molinillo::Resolver::Resolution
- Bundler::Molinillo::ResolverError
- Bundler::Molinillo::SpecificationProvider
- Bundler::Molinillo::UI
- Bundler::Molinillo::VersionConflict
- Bundler::PathError
- Bundler::ProductionError
- Bundler::RemoteSpecification
- Bundler::Resolver
- Bundler::Resolver::Molinillo
- Bundler::Resolver::Molinillo::VersionConflict
- Bundler::Resolver::SpecGroup
- Bundler::Retry
- Bundler::RubyDsl
- Bundler::RubyVersion
- Bundler::RubyVersionMismatch
- Bundler::RubygemsIntegration
- Bundler::RubygemsIntegration::AlmostModern
- Bundler::RubygemsIntegration::Ancient
- Bundler::RubygemsIntegration::Future
- Bundler::RubygemsIntegration::Gem
- Bundler::RubygemsIntegration::Legacy
- Bundler::RubygemsIntegration::Legacy::Gem::SourceIndex
- Bundler::RubygemsIntegration::Modern
- Bundler::RubygemsIntegration::MoreFuture
- Bundler::RubygemsIntegration::MoreModern
- Bundler::RubygemsIntegration::Transitional
- Bundler::Runtime
- Bundler::SecurityError
- Bundler::Settings
- Bundler::SharedHelpers
- Bundler::SimilarityDetector
- Bundler::Source
- Bundler::Source::Git
- Bundler::Source::Git::GitCommandError
- Bundler::Source::Git::GitNotAllowedError
- Bundler::Source::Git::GitNotInstalledError
- Bundler::Source::Git::GitProxy
- Bundler::Source::Path
- Bundler::Source::Path::Installer
- Bundler::Source::Rubygems
- Bundler::Source::Rubygems::Remote
- Bundler::SourceList
- Bundler::SpecSet
- Bundler::StubSpecification
- Bundler::SystemRubyVersion
- Bundler::Thor
- Bundler::Thor::Actions
- Bundler::Thor::Actions::ClassMethods
- Bundler::Thor::AmbiguousCommandError
- Bundler::Thor::Base
- Bundler::Thor::Base::ClassMethods
- Bundler::Thor::Command
- Bundler::Thor::DynamicCommand
- Bundler::Thor::Error
- Bundler::Thor::Group
- Bundler::Thor::HiddenCommand
- Bundler::Thor::Invocation
- Bundler::Thor::Invocation::ClassMethods
- Bundler::Thor::InvocationError
- Bundler::Thor::LineEditor
- Bundler::Thor::LineEditor::Basic
- Bundler::Thor::LineEditor::Readline
- Bundler::Thor::LineEditor::Readline::PathCompletion
- Bundler::Thor::MalformattedArgumentError
- Bundler::Thor::RakeCompat
- Bundler::Thor::RequiredArgumentMissingError
- Bundler::Thor::Shell
- Bundler::Thor::Shell::Basic
- Bundler::Thor::Shell::Color
- Bundler::Thor::Shell::HTML
- Bundler::Thor::UndefinedCommandError
- Bundler::Thor::UnknownArgumentError
- Bundler::Thor::Util
- Bundler::UI
- Bundler::UI::RGProxy
- Bundler::UI::Shell
- Bundler::UI::Silent
- Bundler::VersionConflict
- Bundler::Worker
- Bundler::Worker::WrappedException
- Gem
- Gem::Dependency
- Gem::Platform
- Gem::Requirement
- Gem::Specification
- Net
- Net::HTTP
- Net::HTTP::Persistent
- Net::HTTP::Persistent::Error
- Net::HTTP::Persistent::SSLReuse
- ParallelInstaller
- ParallelInstaller::SpecInstallation
- Object

No matching classes.

." generated with Ronn/v0.7.3 ." github.com/rtomayko/ronn/tree/0.7.3 . .TH "BUNDLE-EXEC" "1" "May 2015" "" "" . .SH "NAME" fBbundle-execfR - Execute a command in the context of the bundle . .SH "SYNOPSIS" fBbundle execfR [--keep-file-descriptors] fIcommandfR . .SH "DESCRIPTION" This command executes the command, making all gems specified in the fBGemfile(5)fR available to fBrequirefR in Ruby programs. . .P Essentially, if you would normally have run something like fBrspec spec/my_spec.rbfR, and you want to use the gems specified in the fBGemfile(5)fR and installed via bundle install(1) fIbundle-install.1.htmlfR, you should run fBbundle exec rspec spec/my_spec.rbfR. . .P Note that fBbundle execfR does not require that an executable is available on your shell's fB$PATHfR. . .SH "OPTIONS" . .TP fB--keep-file-descriptorsfR Exec in Ruby 2.0 began discarding non-standard file descriptors. When this flag is passed, exec will revert to the 1.9 behaviour of passing all file descriptors to the new process. . .SH "BUNDLE INSTALL --BINSTUBS" If you use the fB--binstubsfR flag in bundle install(1) fIbundle-install.1.htmlfR, Bundler will automatically create a directory (which defaults to fBapp_root/binfR) containing all of the executables available from gems in the bundle. . .P After using fB--binstubsfR, fBbin/rspec spec/my_spec.rbfR is identical to fBbundle exec rspec spec/my_spec.rbfR. . .SH "ENVIRONMENT MODIFICATIONS" fBbundle execfR makes a number of changes to the shell environment, then executes the command you specify in full. . .IP "(bu" 4 make sure that it's still possible to shell out to fBbundlefR from inside a command invoked by fBbundle execfR (using fB$BUNDLE_BIN_PATHfR) . .IP "(bu" 4 put the directory containing executables (like fBrailsfR, fBrspecfR, fBrackupfR) for your bundle on fB$PATHfR . .IP "(bu" 4 make sure that if bundler is invoked in the subshell, it uses the same fBGemfilefR (by setting fBBUNDLE_GEMFILEfR) . .IP "(bu" 4 add fB-rbundler/setupfR to fB$RUBYOPTfR, which makes sure that Ruby programs invoked in the subshell can see the gems in the bundle . .IP "" 0 . .P It also modifies Rubygems: . .IP "(bu" 4 disallow loading additional gems not in the bundle . .IP "(bu" 4 modify the fBgemfR method to be a no-op if a gem matching the requirements is in the bundle, and to raise a fBGem::LoadErrorfR if it's not . .IP "(bu" 4 Define fBGem.refreshfR to be a no-op, since the source index is always frozen when using bundler, and to prevent gems from the system leaking into the environment . .IP "(bu" 4 Override fBGem.bin_pathfR to use the gems in the bundle, making system executables work . .IP "(bu" 4 Add all gems in the bundle into Gem.loaded_specs . .IP "" 0 . .SS "Shelling out" Any Ruby code that opens a subshell (like fBsystemfR, backticks, or fB%x{}fR) will automatically use the current Bundler environment. If you need to shell out to a Ruby command that is not part of your current bundle, use the fBwith_clean_envfR method with a block. Any subshells created inside the block will be given the environment present before Bundler was activated. For example, Homebrew commands run Ruby, but don't work inside a bundle: . .IP "" 4 . .nf

Bundler.with_clean_env do

    `brew install wget`

end . .fi . .IP "" 0 . .P Using fBwith_clean_envfR is also necessary if you are shelling out to a different bundle. Any Bundler commands run in a subshell will inherit the current Gemfile, so commands that need to run in the context of a different bundle also need to use fBwith_clean_envfR. . .IP "" 4 . .nf

Bundler.with_clean_env do

    Dir\.chdir "/other/bundler/project" do
      `bundle exec \./script`
    end

end . .fi . .IP "" 0 . .P Bundler provides convenience helpers that wrap fBsystemfR and fBexecfR, and they can be used like this: . .IP "" 4 . .nf

Bundler.clean_system('brew install wget') Bundler.clean_exec('brew install wget') . .fi . .IP "" 0 . .SH "RUBYGEMS PLUGINS" At present, the Rubygems plugin system requires all files named fBrubygems_plugin.rbfR on the load path of fIanyfR installed gem when any Ruby code requires fBrubygems.rbfR. This includes executables installed into the system, like fBrailsfR, fBrackupfR, and fBrspecfR. . .P Since Rubygems plugins can contain arbitrary Ruby code, they commonly end up activating themselves or their dependencies. . .P For instance, the fBgemcutter 0.5fR gem depended on fBjson_purefR. If you had that version of gemcutter installed (even if you fIalsofR had a newer version without this problem), Rubygems would activate fBgemcutter 0.5fR and fBjson_pure <latest>fR. . .P If your Gemfile(5) also contained fBjson_purefR (or a gem with a dependency on fBjson_purefR), the latest version on your system might conflict with the version in your Gemfile(5), or the snapshot version in your fBGemfile.lockfR. . .P If this happens, bundler will say: . .IP "" 4 . .nf

You have already activated json_pure 1.4.6 but your Gemfile requires json_pure 1.4.3. Consider using bundle exec. . .fi . .IP "" 0 . .P In this situation, you almost certainly want to remove the underlying gem with the problematic gem plugin. In general, the authors of these plugins (in this case, the fBgemcutterfR gem) have released newer versions that are more careful in their plugins. . .P You can find a list of all the gems containing gem plugins by running . .IP "" 4 . .nf

ruby -rubygems -e "puts Gem.find_files('rubygems_plugin.rb')" . .fi . .IP "" 0 . .P At the very least, you should remove all but the newest version of each gem plugin, and also remove all gem plugins that you aren't using (fBgem uninstall gem_namefR).

[Validate]

Generated with the Darkfish Rdoc Generator 2.