guard / guard-rspec

Guard::RSpec automatically run your specs (much like autotest)

Home Page:https://rubygems.org/gems/guard-rspec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No such file or directory @ rb_sysopen

asit569 opened this issue · comments

I am getting this error when running ruby app.rb please find a solution for it

pi@raspberrypi:~/waterpi-web $ ruby app.rb
/home/pi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:198:in initialize': No such file or directory @ rb_sysopen - /home/pi/waterpi-web/certs/home/pi/waterpi-web/certs/private.pem.key (Errno::ENOENT) from /home/pi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:198:inopen'
from /home/pi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:198:in key_file=' from /home/pi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:168:inblock in initialize'
from /home/pi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:167:in each_pair' from /home/pi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:167:ininitialize'
from /home/pi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:92:in new' from /home/pi/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:92:inconnect'
from /home/pi/waterpi-web/boot.rb:40:in <top (required)>' from /home/pi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire'
from /home/pi/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' from app.rb:3:in

'
source code-https://github.com/demirhanaydin/waterpi-web

You opened an issue for the Guard::RSpec project, but the error you're getting is from the mqtt gem, which is unrelated.

I've never used the mqtt gem, but to me it seems you just need to generate a private key file and set the path for mqtt, or disable SSL. Documentation on connecting seems to be here: https://github.com/njh/ruby-mqtt#connecting