fromStep3above.rubydk.rbinittogenerat" />

欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

如何確認Devkit是否安裝成功

系統 2049 0

昨天在安裝了Ruby 1.9.2 ,并且將其路徑加入到 Devkit config.yml 中,并且使用 ruby dk.rb install 安裝(不幸的是,沒注意安裝信息)。。但是依然無法構建native gem。于是重裝Ruby,按照devkit的安裝說明來安裝。還是不正確。 Devkit的安裝說明的第4步為Run Installation Scripts:

  • cd <DEVKIT_INSTALL_DIR> from Step 3 above.
  • ruby dk.rb init to generate the config.yml file to be used later in this Step. Your installed Rubies will be listed there (only those installed by a RubyInstaller package are detected at present).
  • edit the generated config.yml file to include installed Rubies not automagically discovered or remove Rubies you do not want to use the DevKit with.
  • [optional] ruby dk.rb review to review the list of Rubies to be enhanced to use the DevKit and verify the changes you made to it are correct.
  • finally, ruby dk.rb install to DevKit enhance your installed Rubies. This step installs (or updates) an operating_system.rb file into the relevant directory needed to implement a RubyGems pre_install hook and a devkit.rb helper library file into <RUBY_INSTALL_DIR>\lib\ruby\site_ruby . NOTE: you may need to use the --force option to update (with backup of the originals) the above mentioned files as discussed at the SFX DevKit upgrade FAQ entry.

在最后一步可知,安裝Devkit其實就是更新了 operating_system.rb 文件,同時新建了 devkit.rb 文件。 在我的電腦上 devkit.rb 已經創建好(Devkit安裝在 D:/Ruby187/devkit 目錄下, 其他電腦上的路徑可能與我的不同 ):

  1. # enable RubyInstaller DevKit usage as a vendorable helper library ?
  2. unless ENV[ 'PATH' ].include?( 'd:\\Ruby187\\devkit\\mingw\\bin' ) then ?
  3. ? puts 'Temporarily enhancing PATH to include DevKit...' ?
  4. ? ENV[ 'PATH' ] = 'd:\\Ruby187\\devkit\\bin;d:\\Ruby187\\devkit\\mingw\\bin;' + ENV[ 'PATH' ]?
  5. end ?
    # enable RubyInstaller DevKit usage as a vendorable helper library

unless ENV['PATH'].include?('d:\\Ruby187\\devkit\\mingw\\bin') then

  puts 'Temporarily enhancing PATH to include DevKit...'

  ENV['PATH'] = 'd:\\Ruby187\\devkit\\bin;d:\\Ruby187\\devkit\\mingw\\bin;' + ENV['PATH']

end
  

在Ruby1.9.2中,有兩個 operating_system.rb 文件,分別位于 lib\ruby\site_ruby\1.9.1\rubygems\defaults lib\ruby\1.9.1\rubygems\defaults 下,其內容相同:

  1. # :DK-BEG: missing DevKit/build tool convenience notice ?
  2. ?
  3. Gem.pre_install do |gem_installer|?
  4. ? unless gem_installer.spec.extensions.empty??
  5. ??? have_tools = %w{gcc make sh}.all? do |t|?
  6. ????? system( "#{t} --version > NUL 2>&1" )?
  7. ??? end ?
  8. ?
  9. ??? unless have_tools?
  10. ????? raise Gem::InstallError,<<-EOT?
  11. The '#{gem_installer.spec.name}' native gem requires installed build tools.?
  12. ?
  13. Please update your PATH to include build tools or download the DevKit?
  14. from 'http://rubyinstaller.org/downloads' and follow the instructions?
  15. at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit' ?
  16. EOT?
  17. ??? end ?
  18. ? end ?
  19. end ?
  20. # :DK-END: ?
    # :DK-BEG: missing DevKit/build tool convenience notice



Gem.pre_install do |gem_installer|

  unless gem_installer.spec.extensions.empty?

    have_tools = %w{gcc make sh}.all? do |t|

      system("#{t} --version > NUL 2>&1")

    end



    unless have_tools

      raise Gem::InstallError,<<-EOT

The '#{gem_installer.spec.name}' native gem requires installed build tools.



Please update your PATH to include build tools or download the DevKit

from 'http://rubyinstaller.org/downloads' and follow the instructions

at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

EOT

    end

  end

end

# :DK-END:
  

參考了我電腦上其他版本的Ruby(1.8.7-p334和1.8.7-p330,分別都只有一個 operating_system.rb ),在安裝好Devkit之后,該文件應該為:

  1. Gem.pre_install do |i|?
  2. ? unless ENV[ 'PATH' ].include?( 'd:\\Ruby187\\devkit\\mingw\\bin' ) then ?
  3. ??? puts 'Temporarily enhancing PATH to include DevKit...' ?
  4. ??? ENV[ 'PATH' ] = 'd:\\Ruby187\\devkit\\bin;d:\\Ruby187\\devkit\\mingw\\bin;' + ENV[ 'PATH' ]?
  5. ? end ?
  6. end ?
    Gem.pre_install do |i|

  unless ENV['PATH'].include?('d:\\Ruby187\\devkit\\mingw\\bin') then

    puts 'Temporarily enhancing PATH to include DevKit...'

    ENV['PATH'] = 'd:\\Ruby187\\devkit\\bin;d:\\Ruby187\\devkit\\mingw\\bin;' + ENV['PATH']

  end

end
  

在修改了 lib\ruby\1.9.1\rubygems\defaults\operating_system.rb 之后,構建native gem時,依然找不到Devkit;但修改 lib\ruby\site_ruby\1.9.1\rubygems\defaults\operating_system.rb 后(不修改 lib\ruby\1.9.1\rubygems\defaults\operating_system.rb ),便可以成功構建。 所以, 如何確認Devkit是否安裝成功呢? 答:檢查 devkit.rb operating_system.rb 文件,其內容應該和上面的內容相同;否則,安裝不成功。 可以手動更改這兩個文件為上面的形式(好像也可以刪除這兩個文件,然后使用 ruby dk.rb install 命令,此時會創建 – 未驗證)。在使用 ruby dk.rb install 時候,需要注意安裝信息或警告,如果某些文件已經存在,可能會跳過。 但是, 為什么在看似“正常”的安裝步驟下,為什么沒能安裝好Devkit? 我沒有找到原因;或許我的某個步驟有問題。我發現,雖然我安裝的是1.9.2,但是卻被安裝在了 lib\ruby\1.9.1 目錄下, 官方解釋 說:

This version is a “library compatible version.” Ruby 1.9.2 is almost 1.9.1 compatible, so the library is installed in the 1.9.1 directory.

如何確認Devkit是否安裝成功


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 欧美三级视频在线观看 | 91tv最新永久在线地址 | 久久一区二区三区不卡 | 欧美妇人 | 久久国产精品久久久久久久久久 | 欧美日韩性猛交xxxxx免费看 | 欧美一级免费 | 国产精品精品视频一区二区三区 | 欧美视频网站 | 一级免费黄色免费片 | 三级网站免费观看 | 五月综合久久 | 国产欧美精品亚洲桃花岛 | 日日摸夜夜添夜夜添精品视频 | 久久夜色精品国产亚洲 | 国产精品福利片免费看 | 国产精品久久久久久中文字 | 成人禁在线观看网站 | 青娱乐手机在线 | 欧美视频三区 | 亚洲成人一区二区 | 欧美三区在线观看 | 国产在线视频网 | 天天澡天天碰天天狠伊人五月 | 亚洲一区二区免费看 | 色播视频在线观看 | 波多野结衣亚洲 | 天天躁日日躁狠狠躁中文字幕 | 青青草国产精品欧美成人 | 一级黄色大全 | 精品一区二区久久久久久久网站 | 亚洲综合在线网 | 成年男女免费视频 | 欧美日本乱大交xxxxx | 黑人巨大videosjapan高清 婷婷在线免费观看 | 三级理伦| 美国黄色毛片 | 九九色网站| 91久久精品久久国产性色也91 | 91精品国产爱久久久久 | 99av涩导航 |