Menu
  • HOME
  • TAGS

Compile error when installing native gem for eventmachine -v '0.12.10'

ruby-on-rails,ruby,rake,bundler,eventmachine

From what I have seen it seems there is an issue with this version, the only way I found to solve this issue was this thread. My suggestion is look in the Gemfile.lock and see which gem requires that version and think about if you actually need it or check...

EventMachine: “`start_tcp_server': no acceptor (port is in use or requires root privileges)”

ruby,tcp,port,eventmachine

I have finally figured it out: it was actually the IP address I was binding to that was incorrect! So essentially it is a very misleading error message, and if you get it, check the IP address too....

Does Ruby support nonblocking HTTP requests without a third-party library?

ruby,http,asynchronous,gem,eventmachine

Based on my tests, MRI does support nonblocking HTTP requests simply by using a thread. Threads don't always allow parallelism in Ruby due to the GIL, but net/http appears to be one of the exceptions: require 'net/http' require 'benchmark' uri = URI('http://stackoverflow.com/questions/30899019/') n = 10 Benchmark.bm do |b| b.report {...

Gracefully disconnect a WebSocket connection with Celluloid

ruby,websocket,google-chrome-devtools,eventmachine,celluloid

I figured it out. I used the 0.0.1 version of the celluloid-websocket-client gem which did not delegate the close method. Using 0.0.2 worked, and the code would look like this: In MeasurementConnection: def close @ws_client.close end In the main code: m = MeasurementConnection.new ARGV[0].strip.gsub("\"","") m.close while m.alive? m.terminate sleep(0.01) end...

How do I bundle eventmachine in ree on Yosemite?

ruby-on-rails,ruby,bundler,eventmachine

You have to install Xcode and the command line tools with: xcode-select --install Also, you have to open Xcode and accept the licence terms. Update: If you have upgraded your system from an earlier OSX you should try to remove your ree installation and reinstall it. $ rvm remove ree-1.8.7-2012.02...

Why is an event loop needed for Asynchronous I/O

.net,ruby,asynchronous,eventmachine,event-loop

My question comes down to this: Why is it that in .Net (and from what I can tell this is true for Java/JVM as well) there's no need for an event loop, and I can fire off an asynchronous request at any time, yet in languages like Ruby/Python, I...

Generate qr-code with event machine

ruby,qr-code,eventmachine

The problem was that I've run server in debug-mode from RubyMine. Starting server from console solves the problem, qr-code generation takes about 1 sec.