What technique does a ruby script use to find your libraries / requires on Windows.
I have an install of Ruby 1.8.7 on Windows to the path C:\Ruby187 and non of my "requires" work.
For example, just a test file
require "rack"
gives no such file to load -- rack (LoadEr开发者_C百科ror)
gem list rack is there
Try
require 'rubygems'
require 'rack'
I believe that in Ruby 1.9+, you no longer have to require 'rubygems', but it is necessary on <= 1.8.
Otherwise, $: is the "Load path for scripts and binary modules by load or require".
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论