Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- thufir@dur:~/ruby$
- thufir@dur:~/ruby$ ruby tel.rb
- /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)
- 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'
- from tel.rb:3:in `<main>'
- thufir@dur:~/ruby$
- thufir@dur:~/ruby$ gem list --local
- *** LOCAL GEMS ***
- bundler (1.3.5)
- bundler-unload (1.0.1)
- coderay (1.0.9)
- em-simple_telnet (0.0.14)
- eventmachine (1.0.3)
- method_source (0.8.2)
- net-ssh (2.6.8)
- net-ssh-telnet (0.0.2)
- open4 (1.3.0)
- pry (0.9.12.2)
- rake (10.1.0)
- redcard (1.1.0)
- rubygems-bundler (1.2.2)
- rubysl-net-telnet (0.0.1)
- rvm (1.11.3.8)
- slop (3.4.6)
- ssh (1.1.0)
- thufir@dur:~/ruby$
- thufir@dur:~/ruby$ cat tel.rb
- #!/usr/bin/env ruby
- require 'rubygems'
- require 'em/simple_telnet'
- require 'yaml'
- require 'pry'
- require 'pp'
- opts = YAML.load_file('params.yml')
- EM::P::SimpleTelnet.new(opts) do |host|
- puts host.cmd("ls -la")
- end
- thufir@dur:~/ruby$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement