Advertisement
thufir

Untitled

Aug 28th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. thufir@dur:~/ruby$
  2. thufir@dur:~/ruby$ ruby tel.rb
  3. /home/thufir/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require': cannot load such file -- em/simple_telnet (LoadError)
  4. from /home/thufir/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require'
  5. from tel.rb:3:in `<main>'
  6. thufir@dur:~/ruby$
  7. thufir@dur:~/ruby$ gem list --local
  8.  
  9. *** LOCAL GEMS ***
  10.  
  11. bundler (1.3.5)
  12. bundler-unload (1.0.1)
  13. coderay (1.0.9)
  14. em-simple_telnet (0.0.14)
  15. eventmachine (1.0.3)
  16. method_source (0.8.2)
  17. net-ssh (2.6.8)
  18. net-ssh-telnet (0.0.2)
  19. open4 (1.3.0)
  20. pry (0.9.12.2)
  21. rake (10.1.0)
  22. redcard (1.1.0)
  23. rubygems-bundler (1.2.2)
  24. rubysl-net-telnet (0.0.1)
  25. rvm (1.11.3.8)
  26. slop (3.4.6)
  27. ssh (1.1.0)
  28. thufir@dur:~/ruby$
  29. thufir@dur:~/ruby$ cat tel.rb
  30. #!/usr/bin/env ruby
  31. require 'rubygems'
  32. require 'em/simple_telnet'
  33. require 'yaml'
  34. require 'pry'
  35. require 'pp'
  36.  
  37. opts = YAML.load_file('params.yml')
  38.  
  39. EM::P::SimpleTelnet.new(opts) do |host|
  40. puts host.cmd("ls -la")
  41. end
  42. thufir@dur:~/ruby$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement