开发者

No such file or directory

开发者 https://www.devze.com 2023-03-14 18:22 出处:网络
This is the error. Atrosity [ Eric-Raios-MacBook ][ ~/dev/rubyscripts ]$ ruby script.rb script.rb:7:in `read\': No such file or directory - sent开发者_开发技巧 (Errno::ENOENT)

This is the error.

Atrosity [ Eric-Raios-MacBook ][ ~/dev/rubyscripts ]$ ruby script.rb 
script.rb:7:in `read': No such file or directory - sent开发者_开发技巧 (Errno::ENOENT)
from script.rb:7:in `lSent'
from script.rb:16:in `<main>'

My Method that is causing the error is:

def lSent
  $sent = Set.new(File.read("sent").split(";"))
end

lSent

If I delete this, my script runs but does not output what I want to do.


sent should be a path to a file in your server, such as

$sent = Set.new(File.read("/root/path/file.txt").split(";"))


You're attempting to read a file called "sent", but it doesn't exist in the application's path. Try including the full path to the file.

0

精彩评论

暂无评论...
验证码 换一张
取 消