Downloads:

82,964

Downloads of v 4.7.2.2013022403:

15,043

Last Update:

10/17/2018

Package Maintainer(s):

Software Author(s):

  • RubyInstaller Contributors

Tags:

Ruby ruby2 DevKit

Ruby DevKit (2.0+)

4.7.2.2013022403 | Updated: 10/17/2018

Downloads:

82,964

Downloads of v 4.7.2.2013022403:

15,043

Maintainer(s):

Software Author(s):

  • RubyInstaller Contributors

Tags:

Ruby ruby2 DevKit

Ruby DevKit (2.0+) 4.7.2.2013022403

This Package Contains an Exempted Check

1 Test Passing and 1 Exempted Test


Validation Testing Passed


Verification Testing Exempt:

This package doesn't have a dependency on ruby, so it will fail on verifier, as ruby isn't installed.

To install Ruby DevKit (2.0+), run the following command from the command line or from PowerShell:

>

To upgrade Ruby DevKit (2.0+), run the following command from the command line or from PowerShell:

>

To uninstall Ruby DevKit (2.0+), run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade ruby2.devkit -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade ruby2.devkit -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure ruby2.devkit installed
  win_chocolatey:
    name: ruby2.devkit
    state: present
    version: 4.7.2.2013022403
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'ruby2.devkit' do
  action    :install
  version  '4.7.2.2013022403'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: ruby2.devkit,
    Version: 4.7.2.2013022403,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller ruby2.devkit
{
   Name     = 'ruby2.devkit'
   Ensure   = 'Present'
   Version  = '4.7.2.2013022403'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'ruby2.devkit':
  provider => 'chocolatey',
  ensure   => '4.7.2.2013022403',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install ruby2.devkit version="4.7.2.2013022403" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator gep13 on 10/21/2018.

Description

Ruby Development Kit (DevKit) is a toolkit that makes it easy to build and use native C/C++ extensions such as RDiscount and RedCloth for Ruby on Windows.

This does not take a dependency on Ruby. Please install that first.

tools\chocolateyInstall.ps1
try {
  $binRoot = Get-BinRoot
  if ($binRoot -eq $null) {
    $binRoot = "$env:systemdrive\"
  }

  $pp = Get-PackageParameters
  $devKitInstallDir = if ($pp.InstallDir) { $pp.InstallDir } else { join-path $binRoot 'DevKit2' }

  write-host "Chocolatey is installing DevKit to $devKitInstallDir"
  write-host "Please wait..."
  Start-sleep 3

  if (![System.IO.Directory]::Exists($devKitInstallDir)) {[System.IO.Directory]::CreateDirectory($devKitInstallDir)}
  $tempDir = "$env:TEMP\chocolatey\ruby.devkit"
  if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)}
  $file = Join-Path $tempDir "ruby.devkitInstall.exe"
  $url = 'https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe'
  $checksum = '9383f12958aafc425923e322460a84de'
  $url64 = 'https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe'
  $checksum64 = 'ce99d873c1acc8bffc639bd4e764b849'
  $checksumType = 'md5'
  Get-ChocolateyWebFile 'ruby2.devkit' "$file" -url "$url" -url64bit "$url64" -checksum "$checksum" -checksum64 "$checksum64" -checksumType "$checksumType"

  if ($($env:Path).ToLower().Contains("ruby") -eq $false) {
    $env:Path = [Environment]::GetEnvironmentVariable('Path',[System.EnvironmentVariableTarget]::Machine);
  }

  # Preparation
  #If you previously installed the legacy DevKit devkit-3.4.5r3-20091110.7z, its artifacts were extracted into each Ruby installation and need to be manually removed. Remove the gcc.bat, make.bat, and sh.bat stub batch files in <RUBY_INSTALL_DIR>\bin and the <RUBY_INSTALL_DIR>\devkit subdirectory for each Ruby installation using the legacy DevKit.
  $pathItems = $env:Path
  foreach($pathItem in $pathItems -split ";") {
    if ($pathItem -ilike "*ruby*bin") {
      Write-Host "Removing legacy install devkit items from $pathItem if they exist"
      if ([System.IO.File]::Exists("$($pathItem)\gcc.bat")) { Remove-Item "$($pathItem)\gcc.bat" -force}
      if ([System.IO.File]::Exists("$($pathItem)\make.bat")) { Remove-Item "$($pathItem)\make.bat" -force}
      if ([System.IO.File]::Exists("$($pathItem)\sh.bat")) { Remove-Item "$($pathItem)\sh.bat" -force}
      $oldDevKit = Join-Path (Split-Path -Parent $pathItem) 'devkit'
      if ([System.IO.Directory]::Exists("$oldDevKit")) {[System.IO.Directory]::Delete($oldDevKit,$true)}
    }
  }

  # clean out the recommended directories
  # 2. Delete all the <DEVKIT_INSTALL_DIR> subdirectories and files except for config.yml. If you’ve made any customizations to the MSYS shell you may also want to keep files in the etc and home subdirectories.
  if ([System.IO.File]::Exists("$($devKitInstallDir)\config.yml")) {
    Write-Host "Moving config.yml to a holding location prior to extraction"
    Copy-Item "$($devKitInstallDir)\config.yml" "$tempDir" -Force
  }

  if ([System.IO.Directory]::Exists("$($devKitInstallDir)\etc")) {
    Write-Host "Moving etc dir to a holding location prior to extraction"
    if (![System.IO.Directory]::Exists("$($tempDir)\etc")) {[System.IO.Directory]::CreateDirectory("$($tempDir)\etc")}
    Copy-Item "$($devKitInstallDir)\etc\*" "$($tempDir)\etc" -Force -Recurse
  }

  if ([System.IO.Directory]::Exists("$($devKitInstallDir)\home")) {
    Write-Host "Moving home dir to a holding location prior to extraction"
    if (![System.IO.Directory]::Exists("$($tempDir)\home")) {[System.IO.Directory]::CreateDirectory("$($tempDir)\home")}
    Copy-Item "$($devKitInstallDir)\home\*" "$($tempDir)\home" -Force -Recurse
  }

  write-host "Cleaning out the contents of $devKitInstallDir"
  Remove-Item "$($devKitInstallDir)\*" -recurse -force

  # 3. Extract the new SFX DevKit into the same <DEVKIT_INSTALL_DIR> that you just cleaned up.
  write-host "Extracting the contents of $file to $devKitInstallDir"
  #& 7za x -o"$devKitInstallDir" -y "$file"
  Start-Process "7za" -ArgumentList "x -o`"$devKitInstallDir`" -y `"$file`"" -Wait

  if ([System.IO.File]::Exists("$($tempDir)\config.yml")) {
    Write-Host "Moving config.yml back after extraction"
    Copy-Item "$($tempDir)\config.yml" "$devKitInstallDir" -Force
  }

  if ([System.IO.Directory]::Exists("$($tempDir)\etc")) {
    Write-Host "Moving etc dir back after extraction"
    Copy-Item "$($tempDir)\etc\*" "$($devKitInstallDir)\etc" -Force -Recurse
  }

  if ([System.IO.Directory]::Exists("$($tempDir)\home")) {
    Write-Host "Moving home dir back after extraction"
    Copy-Item "$($tempDir)\home\*" "$($devKitInstallDir)\home" -Force -Recurse
  }

  # 4. Review your config.yml file to ensure it contains the root directories of all the installed Rubies you want enhanced to use the DevKit.
  Write-Host "You may want to configure your config.yml after this installation and rerun 'cinst ruby2.devkit' if the defaults do not meet your needs"
  Start-Sleep 1
  # 5. From a Command Prompt, cd into the <DEVKIT_INSTALL_DIR> directory and run ruby dk.rb install --force. This will cause all your installed Rubies listed in config.yml to use the updated SFX DevKit when building native gems and update the DevKit’s helper scripts (devkit.rb and operating_system.rb) with any new functionality. For safety, the original helper scripts are timestamp archived beside the new helper scripts. It’s always a good idea to review the two versions (and potentially make modifications) to ensure configuration specific to your system still works as expected.
  Write-Host "Initializing and installing DevKit into Ruby."
  cd $devKitInstallDir
  & ruby dk.rb init
  & ruby dk.rb install --force

  Write-ChocolateySuccess 'ruby2.devkit'
} catch {
  Write-ChocolateyFailure 'ruby2.devkit' "$($_.Exception.Message)"
  throw
}


In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Ruby DevKit (2.0+) 4.7.2.2013022402 65556 Monday, November 17, 2014 Approved
Ruby DevKit (2.0+) 4.7.2.2013022401 2270 Wednesday, June 25, 2014 Approved
Discussion for the Ruby DevKit (2.0+) Package

Ground Rules:

  • This discussion is only about Ruby DevKit (2.0+) and the Ruby DevKit (2.0+) package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Ruby DevKit (2.0+), or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus