in `require': no such file to load -- date/format

本文记录了在安装Ruby过程中遇到的一个错误,并详细描述了解决步骤。错误原因是由于安全软件McAfee阻止了某些文件的访问,最终通过暂时禁用McAfee解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天学习ruby,下载了ruby并安装,之后参考相关入门教程开始第一个小程序,在命令行直接运行:

ruby -e "print 'hello, yiditushe'",回车之后,提示如下错误:

 

C:\Documents and Settings\yiditushe>ruby -e "print 'hello, world'"
C:/Ruby/lib/ruby/1.8/date.rb:197:in `require': no such file to load -- date/format (LoadError)
        from C:/Ruby/lib/ruby/1.8/date.rb:197
        from C:/Ruby/lib/ruby/1.8/yaml/rubytypes.rb:2:in `require'
        from C:/Ruby/lib/ruby/1.8/yaml/rubytypes.rb:2
        from C:/Ruby/lib/ruby/1.8/yaml.rb:396:in `require'
        from C:/Ruby/lib/ruby/1.8/yaml.rb:396
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:7:in `require'
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:7
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:882:in `require'
        from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:882
        from C:/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:in `require'
        from C:/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10

 

开始在网上查了下资料,说是C:\Ruby\lib\ruby\1.8\date\目录下的format.rb不存在导致的,但我到该目录下查看,发现该文件存在,但是我用UE不能打开它,提示如下:

 

 

又到其它目录看用同样方法打开其它的文件,发现可以打开。这下就奇怪了。左想右想,又是卸载又是重新安装,还是不行。折腾了几个小时后,最后居然发现当我把McAfee的按访问扫描关闭后,文件可以正常打开!

 

再次运行那个程序,成功了!晕,McAfee这也行。

C:\Documents and Settings\yiditushe>ruby -e "print 'hello, world'"
hello, world
C:\Documents and Settings\yiditushe>

 

以后运行ruby程序就只好把McAfee关闭咯。还没找到可以修改McAfee的什么配置。

[root@yfw ~]# cd /www/wwwroot/szrengjing.com/chat [root@yfw chat]# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" PHP: syntax error, unexpected '(' in /www/server/php/56/etc/php-cli.ini on line 883 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/modulename.extension' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/modulename.extension: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.dll' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.dll: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.so' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/path/to/extension/msql.so' - /path/to/extension/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in Command line code on line 1 Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in Command line code on line 1 PHP Warning: copy(): Failed to enable crypto in Command line code on line 1 Warning: copy(): Failed to enable crypto in Command line code on line 1 PHP Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1 Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1 [root@yfw chat]# php composer-setup.php PHP: syntax error, unexpected '(' in /www/server/php/56/etc/php-cli.ini on line 883 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/modulename.extension' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/modulename.extension: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.dll' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.dll: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.so' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/path/to/extension/msql.so' - /path/to/extension/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0 Could not open input file: composer-setup.php [root@yfw chat]# php composer.phar require ratchet/ratchet:0.3.6 PHP: syntax error, unexpected '(' in /www/server/php/56/etc/php-cli.ini on line 883 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/modulename.extension' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/modulename.extension: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.dll' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.dll: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.so' - /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/path/to/extension/msql.so' - /path/to/extension/msql.so: cannot open shared object file: No such file or directory in Unknown on line 0 Could not open input file: composer.phar [root@yfw chat]# 报错了吧
最新发布
07-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值