-
Notifications
You must be signed in to change notification settings - Fork 9
ubuntu
Scott Yoder edited this page Aug 29, 2015
·
2 revisions
sudo apt-get install ruby ruby-dev bluetooth bluez libbluetooth-dev
In order to use this gem with BlueZ, you need to have root privileges. Either you will need to run your Ruby script with sudo
, or you will need to assign the appropriate permissions via setcap
.
In order to use setcap
, you first need to make sure it is installed:
sudo apt-get install libcap2-bin
Then you can set the permissions:
sudo setcap 'cap_net_raw,cap_net_admin+eip' <path-to-ruby-binary-here>
Notes:
- you cannot use setcap on a link, it has to be the actual Ruby binary.
- If you are using
RVM
and usesetcap
on your Ruby binary, you need to be aware of this issue: https://github.com/rvm/rvm/issues/2925. The upshot is that until this issue is fixed, if you are using a pre-built binary from RVM you may have to re-install from source:
rvm reinstall 2.1.2 --disable-binary