Undefined method 'domain!'
Opened this issue · 8 comments
Hi,
After upgrading to mina 1.0.3 (and using mina-scp 0.1.2) I started seeing this when I do an scp_upload:
mina aborted!
NoMethodError: undefined method domain!' for main:Object /Users/alxx/.rvm/gems/ruby-2.2.3@latestrails/gems/mina-scp-0.1.2/lib/mina/scp.rb:2:in
scp_transfer'
/Users/alxx/.rvm/gems/ruby-2.2.3@latestrails/gems/mina-scp-0.1.2/lib/mina/scp.rb:23:in `scp_upload'
Any ideas?
Thanks.
Just run into exactly the same problem here.
Did you try replacing "domain" and the other settings with "fetch(:domain)"?
Apparently this is how mina variables should now be accessed.
I tried now, did not help, since I am not making use of ":user"... somehow I was also hoping mina-scp would make use of the already established scp connection, but it just calls scp. So, indeed, its better to call that directly.
Here's a working example:
scp -i #{fetch(:identity_file)} #{file} #{fetch(:user)}@#{fetch(:domain)}:/tmp/
(Wrap that in reverse apostrophes, "`" -- I can't seem to do it in here)
Maybe you don't need that -i, or you need some other params instead; you can customise it as you need.
Created a pull request
Same problem..
Simple solution - not install mina-scp
gem, but create mina_scp.rb
file based on pull request's file:
https://github.com/adie/mina-scp/blob/2c47cdce9e457496e32e8d58586aa778814bc6d0/lib/mina/scp.rb
For Rails structure:
- place
mina_scp.rb
inlib
folder - in Mina's config file
config/deploy.rb
addrequire_relative '../lib/mina_scp'
And then scp_download
and scp_upload
will be available.