Method: Bundler::Definition#validate_platforms!

Defined in:
lib/bundler/definition.rb

#validate_platforms!Object

Raises:



501
502
503
504
505
506
507
# File 'lib/bundler/definition.rb', line 501

def validate_platforms!
  return if current_platform_locked? || @platforms.include?(Gem::Platform::RUBY)

  raise ProductionError, "Your bundle only supports platforms #{@platforms.map(&:to_s)} " \
    "but your local platform is #{Bundler.local_platform}. " \
    "Add the current platform to the lockfile with\n`bundle lock --add-platform #{Bundler.local_platform}` and try again."
end