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條評論
主站蜘蛛池模板: 欧美日韩大尺码免费专区 | 国产福利自产拍在线观看 | 国产真实乱子伦清晰对白 | 天天操天天插 | 成年人国产网站 | 亚洲国产精品久久婷婷 | 四虎影视永久免费观看网址 | 免费观看性欧美大片无片 | 精产国产伦理一二三区 | 欧美精品日韩一区二区三区 | 亚洲热久久 | 日韩中文字 | 国产亚洲精品久久久久久国模美 | 一区二区三区在线 | 久久88香港三级 | 超碰97人人艹 | 久久久久久久免费视频 | 94在线成人免费视频 | 欧美日韩亚洲国产 | 亚洲自拍偷拍色图 | 亚洲福利视频一区二区 | 加勒比 テカ痴女の猛烈交尾 | 中文字幕 国产精品 | 久久69精品久久久久久久电影好 | 日韩精品一区二区在线观看 | 2021国产精品视频一区 | 国产免费观看一区 | 欧美性视频网 | 免费国产黄频在线观看视频 | 欧美三极 | 免费高清成人啪啪网站 | 亚洲人人视频 | 狠狠干夜夜撸 | 久久www免费人成精品 | 91在线视频免费观看 | 亚洲视频在线观看 | 欧美激情视频网站 | 婷婷综合激情网 | 密室逃脱第一季免费观看完整在线 | 国内精品久久久久激情影院 | 久久一区二区三区免费 |