instance method bundle_command

Ruby on Rails 3.2.22.5

Since v3.1.12 Last seen in v3.2.22.5

Available in: v3.1.12 v3.2.22.5

Signature

bundle_command(command)

No documentation comment.

Parameters

command req
Source
# File railties/lib/rails/generators/app_base.rb, line 241
      def bundle_command(command)
        say_status :run, "bundle #{command}"

        # We are going to shell out rather than invoking Bundler::CLI.new(command)
        # because `rails new` loads the Thor gem and on the other hand bundler uses
        # its own vendored Thor, which could be a different version. Running both
        # things in the same process is a recipe for a night with paracetamol.
        #
        # We use backticks and #print here instead of vanilla #system because it
        # is easier to silence stdout in the existing test suite this way. The
        # end-user gets the bundler commands called anyway, so no big deal.
        #
        # Thanks to James Tucker for the Gem tricks involved in this call.
        print `"#{Gem.ruby}" -rubygems "#{Gem.bin_path('bundler', 'bundle')}" #{command}`
      end

Defined in railties/lib/rails/generators/app_base.rb line 241 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generators::AppBase

Type at least 2 characters to search.

↑↓ navigate · open · esc close