惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - chensss2008

JavaScript 中的undefined and null 学习 html5 file upload and form data by ajax openresty + lua-resty-weedfs + weedfs + graphicsmagick动态生成缩略图(类似淘宝方案) ubuntu10.04 安装oracle server 版 笔记 windows xp + mysql5.5 + phpmyadmin insert 中文繁體 (原创)ubuntu 10.04+ruby1.9.2+rails3 安装记录 ruby簡單的代碼行統計工具 Ruby中如何复制对象 (deep clone)(转载) vi 常用命令使用說明 ruby1.9.2 +windowxp svn Server sent unexpected return value (403 Forbidden) in response to CHECKOUT ubuntu 14.04 安装svn server (subversionedge ) ubuntu 13.10 install wireshark Ubuntu 14.10下基于Nginx搭建mp4/flv流媒体服务器(可随意拖动)并支持RTMP/HLS协议(含转码工具) mysql distinct field1,field2,field3, .... from table jsoup 使用总结4--高级用法之 script js 脚本 jsoup 使用总结3--高级用法之 not jsoup 使用总结2--高级用法之 :gt(n) jsoup 使用总结1--添加header
require './ex25' can't load such file
chensss2008 · 2015-07-17 · via 博客园 - chensss2008

require './ex25' can't load such file

在练习learn ruby the hard way时候,第25题,发生了一下错误

LoadError: cannot load such file -- ./ex25
from /Users/yutu04/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' from /Users/yutu04/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require'
from (irb):8
from /Users/yutu04/.rvm/rubies/ruby-2.2.0/bin/irb:11:in `

'

很显然是因为没有找到ex25.rb文件导致的,
那么如何处理呢,实在irb中直接导向到ex25.rb 所在的目录可以不?
但是我不知道怎么处理的,
后来 在stackoverflow上面查到了原因

the workding directory is no longer in the Ruby path in Ruby 1.92.

所以将irb退出,然后在terminal中讲路径先导向到ex25.rb所在的目录
然后再irb。
这次require './ex25' 成功

2.2.0 :001 > require './ex25'
=> true

如果你觉得每次输入Ex25 这个module名称太费事,那么可以改为

include Ex25
相当于说【我要讲Ex25 这个module里的所以东西include到我ianz的module里面。】