I am trying to run rackup for running a ruby application. I am getting this error.
C:\Ali\Ruby\App>rackup -p $PORT -o $IP
[2016-09-30 06:11:32] INFO WEBrick 1.3.1
[2016-09-30 06:11:32] INFO ruby 2.2.4 (2015-12-16) [i386-mingw32]
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/socket.rb:232:in `getaddrinfo': getad
drinfo: The specified class was not found. (SocketError)
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/socket.rb:232:in `foreac
h'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/socket.rb:459:in `tcp_se
rver_sockets'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/webrick/utils.rb:70:in `
create_listeners'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/webrick/server.rb:133:in
`listen'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/webrick/server.rb:114:in
`initialize'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:45
:in `initialize'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib
/rack/handler/webrick.rb:31:in `new'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib
/rack/handler/webrick.rb:31:in `run'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib
/rack/server.rb:286:in `start'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib
/rack/server.rb:147:in `start'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rack-1.6.4/bin
/rackup:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/bin/rackup:23:in `load'
from C:/RailsInstaller/Ruby2.2.0/bin/rackup:23:in `<main>'
What is wrong? Any help is appreciated.
Judging from your command-line path, you're using MS-DOS. The variables $PATH
and $IP
are Unix-style variables. Under MS-DOS, you would use %PATH%
and %IP%
.
Try:
C:\Ali\Ruby\App> echo %PATH%
and if that works (displays a long path), try making those changes.