我在家里的Mac上写了一个家庭作业,我现在正试图在学校的Linux机器上运行它(它将被评分)并且正在获得:
.rb:1:in `require': no such file to load -- socket (LoadError)
显然我正在尝试使用Ruby的socket类:
require 'socket'
检查学校ruby版本我看到:ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
不应该是这个版本的套接字吗?难道我做错了什么?无论如何要让它发挥作用?
gem env
输出:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /home/devans/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/