Reading from serial port in a Ruby on Rails application hangs
问题 I'm using the serialport gem to read from the serial port in my Ruby on Rails 3.2 application. The serial port itself is used to write data from an Arduino board. The gem is added to Gemfile . The port is initialized in application.rb : config.serial_port = SerialPort.new "/devttyACM0", 9600 config.serial_port.read_timeout = 100 The problem appears when I try to read from this port. @sp = ProjectName::Application::config.serial_port @sp.read The application hangs deadly. I've tried to perform