[Rails] net/ping now working
Hi,
i'm developing a application using Rails 4. In my model I have a method
where i make a ping to a host on my network. I'm using 'net-ping' gem,
declared in gemFile, and Rails Server starts OK.
Well, when i use the gem, as in another apps on Ruby, I do:
Net::Ping::External.new @name
But i receive:
Completed 500 Internal Server Error in 168ms
NameError (uninitialized constant Net::Ping::External):
app/models/System.rb:169:in `checkSystem'
app/controllers/update_controller.rb:13:in `block in check_error'
app/controllers/update_controller.rb:12:in `check_error'
Searching on the Web I have tested the following:
require 'rubygems'
require 'net/ping'
But now the error is:
LoadError (cannot load such file -- net/ping):
app/models/System.rb:2:in `<top (required)>'
app/controllers/update_controller.rb:11:in `check_error'
I don't know how to debug this... Any idea/help?
Thanks!!
M.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cb85153bac5dd99765db59f398a4bfae%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home