Domanda

Dal momento che l'aggiornamento delle mie rotaie (2.3.17) App a Ruby 1.9.3 Ho perso il metodo ssh.sftp.upload!, quindi sto cercando di utilizzare la libreria Net-SCP, tuttavia non riesco a usarlo in rotaie.In irb posso tuttavia richiedere il file FINE, non solo nella console dei binari.

me@app:~/myapp$ script/console myapp
Loading myapp environment (Rails 2.3.17)
>> require 'net/scp'
MissingSourceFile: cannot load such file -- net/scp
  from /path/to/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/dependencies.rb:184:in `require'
  from /path/to/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/dependencies.rb:184:in `require'
  from (irb):1
  from /home/me/.rvm/rubies/ruby-1.9.3-p448/bin/irb:16:in `<main>'
.

Questo sembra funzionare comunque:

>> require 'net/ssh'
=> false
.

Ecco il mio Gemfile.lock pertinente

$ cat Gemfile.lock | grep "net-scp" -n5
30-      nokogiri (>= 1.4.4)
31-      uuidtools (~> 2.1)
32-    builder (2.1.2)
33-    capistrano (2.14.2)
34-      highline
35:      net-scp (>= 1.0.0)
36-      net-sftp (>= 2.0.0)
37-      net-ssh (>= 2.0.14)
38-      net-ssh-gateway (>= 1.1.0)
39-    capistrano-ext (1.2.1)
40-      capistrano (>= 1.0.0)
--
106-    multi_xml (0.5.3)
107-    mysql (2.9.0)
108-    net-http-digest_auth (1.2.1)
109-    net-http-persistent (2.8)
110-    net-ldap (0.3.1)
111:    net-scp (1.1.0)
112-      net-ssh (>= 2.6.5)
113-    net-sftp (2.1.1)
114-      net-ssh (>= 2.6.5)
115-    net-ssh (2.7.0)
116-    net-ssh-gateway (1.2.0)
.

Come posso aggiustare o aggirare questo?

È stato utile?

Soluzione

Apparentemente era semplice come includere net-scp nel Gemfile, anche se è incluso con net-ssh e capistrano.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top