Fichier Ruby.nouveau `initialize': Aucun fichier ou répertoire

Je suis complètement déconcerté par celui-ci. Je suis en train de déboguer du code qui crée un FirstRun fichier comme un marqueur que le programme a déjà fait ses premiers exécutez le programme d'installation. Il essaie de créer ce dans le répertoire de travail spécifié, donnée par le absworkingdir variable. Toutefois, lorsqu'il tente de créer un fichier avec File.new j'obtiens l'erreur suivante

`initialize': No such file or directory '

Voici le code correspondant:

#First run setup
puts workingdir#debug
absworkingdir = File.expand_path(workingdir)
puts absworkingdir#debug
if File.exist?("#{absworkingdir}/FirstRun.lock") == false
    puts "This appears to be the first run of FigShare Sync. We'll setup a few things."
    print "Where would you like to store settings and files? [~./figsharesync]: "
    @input = gets.chomp
    puts @input#debug
        if @input.empty? == false
            workingdir = @input
            absworkingdir = File.expand_path(workingdir)
        end
    print "Please enter OAuth consumer key: "
    consumerkey = gets.chomp
    print "Please enter OAuth consumer key secret: "
    consumersecret = gets.chomp
    print "Please enter OAuth access token: "
    accesstoken = gets.chomp
    print "Please enter OAuth access token secret: "
    accesstokensecret = gets.chomp
    puts "Great! we'll get running now..."
puts absworkingdir#debug
File.new("#{absworkingdir}/FirstRun.lock", "r")
end

Voici la sortie de débogage lignes:

~/.figsharesync/                                                                                                                                                                                                                        
/var/lib/stickshift/5165dc1e4382ec92040001a8/app-root/data/.figsharesync                                                                                                                                                                
This appears to be the first run of FigShare Sync. We'll setup a few things.                                                                                                                                                            
Where would you like to store settings and files? [~./figsharesync]:                                                                                                                                                                    

Please enter OAuth consumer key:                                                                                                                                                                                                        
Please enter OAuth consumer key secret:                                                                                                                                                                                                 
Please enter OAuth access token:                                                                                                                                                                                                        
Please enter OAuth access token secret:                                                                                                                                                                                                 
Great! we'll get running now...                                                                                                                                                                                                         
/var/lib/stickshift/5165dc1e4382ec92040001a8/app-root/data/.figsharesync                                                                                                                                                                
source/figsharesync2.rb:38:in `initialize': No such file or directory - /var/lib/stickshift/5165dc1e4382ec92040001a8/app-root/data/.figsharesync/FirstRun.lock(Errno::ENOENT)                                                          
    from source/figsharesync2.rb:38:in `new'                                                                                                                                                                                        
    from source/figsharesync2.rb:38:in `<main>'     
  • Essayé suggestiongs de @JulienLanglois et iamnotmaynard en vain. J'obtiens toujours la même "n'existe pas" d'erreur.
  • Pour quelqu'un d'autre d'avoir ce problème, il est en effet un Cloud 9 question. Le terminal par défaut un dossier au sein de l' ~/ généralement un nombre à six chiffres. E. g. ~/111111/
InformationsquelleAutor user2276204 | 2013-04-24