This works on windows<pre>loop do a = system(“ping 192.168.0.1″) if a print “\a”*1000 break endend </pre>
Monthly Archives: December 2007
bug report
GgGgGgGgGgGgGgeventmachine/svn/version_0/lib/rubyeventmachine.so: 5: Access is denied. – eventmachine/svn/version_0/lib/rubyeventmachine.so (LoadError)may mean ‘that guy is compiled on linux, not win32!’
eventmachine oddities
so if you get ‘frozen Threadgroup’ in mac os x, or if you get ‘hangs’ when you run backticks, it is because Ruby stinks with threads and IO. Run single threaded and it should work–unless you have tons and tons of ports open, in which case somehow lots of weirdness occurs. Like lots of port unbinds.
how to run acts_as_ferret in windows
Still haven’t figured it out totally. Seems that at least aaf 0.4.3 needs fork, so even reverting backgroundrb (painfully) to its oldest version
svn checkout svn+ssh://developername@rubyforge.org/var/svn/backgroundrb
doesn’t solve the problem. Might as well live with stubs!
wireshark on leopard
If you get xterm Xt error: Can’t open display: :0:~ Roger$export DISPLAY=:0.0that may mean ‘run an x application before starting macports stuffs, then run macports stuffs’ (with an updated macports…etc…etc.)
how to get ports to work with leopard
as specified in the port description page, you need to create ~/.profile file
export PATH=/opt/local/bin:/opt/local/sbin:$PATH export DISPLAY=:0.0
Then after installing macports directly, you can run
. ~/.profile
on the command line and then run sudo port “whatever”
and it will work now.
And also executables installed by mac port will work as expected, only after running that
. ~/.profile
in each terminal.
ruby mingw win32
So…I tried out Ruby with mingw and it is indeed faster! Significantly faster. It is like ‘Wow ruby actually works!’
This distro has old version of rubygems, which isn’t quite as compatible, but works as a demo:
http://doachristianturndaily.info/ruby_distro
faster mongrel?
I’ve seen reports of ‘fcgi’ running quicker than mongrel behind nginx. The reporters make the presumption that it is because of unix sockets. So then I wonder if changing evented mongrel to use unix sockets would speed it up (easier to do that than changing mongrel itself, I’d imagine). And perhaps re-using connections would help, as well.
os x gethostbyname
So if you wanna use os x to get your host’s ipv4 address, instead of using Socket.gethostbynameuseSocket.getaddrinfo(Socket.gethostname, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME)I think
ruby stuffs
test_get_sockname.rb:20: syntax error, unexpected kAND, expecting ‘)’ assert(peername and !peername.blank?)
means “replace your and with &&’s!” NoMethodError: undefined method `assert’ for #<#<Class:0x489e78>:0x489d10> means ‘wrap your asserts with parentheses