This works on windows<pre>loop do a = system(“ping 192.168.0.1″) if a print “\a”*1000 break endend </pre>
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!’
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.
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://email@example.com/var/svn/backgroundrb
doesn’t solve the problem. Might as well live with stubs!
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.)
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
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
in each terminal.
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:
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
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