no such file or directory
Closed this issue · 1 comments
rimeno commented
Hi,
thanks for your INSTALL.md !
But I can't start application on a fresh (re)installed raspbian.
When I run bundle exec rackup --host 0.0.0.0
:
/home/pi/pifi-radio/app/utils.rb:17:in `read': No such file or directory @ rb_sysopen - (Errno::ENOENT)
from /home/pi/pifi-radio/app/utils.rb:17:in `file_to_hash'
from /home/pi/pifi-radio/app/utils.rb:10:in `get_streams'
from /home/pi/pifi-radio/app/app.rb:17:in `<top (required)>'
from /home/pi/pifi-radio/config.ru:1:in `require'
from /home/pi/pifi-radio/config.ru:1:in `block in <main>'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
from /home/pi/pifi-radio/config.ru:in `new'
from /home/pi/pifi-radio/config.ru:in `<main>'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:49:in `eval'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:49:in `new_from_string'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/builder.rb:40:in `parse_file'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:319:in `build_app_and_options_from_config'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:219:in `app'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:354:in `wrapped_app'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:283:in `start'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/lib/rack/server.rb:148:in `start'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/gems/rack-2.0.6/bin/rackup:4:in `<top (required)>'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/bin/rackup:22:in `load'
from /home/pi/pifi-radio/vendor/bundle/ruby/2.3.0/bin/rackup:22:in `<main>'
I don't understand, because everything looks good :
$ pwd
/home/pi/pifi-radio
$ cat /etc/pifi-radio.conf
{
"cache_max_age": 120,
"serve_static": true,
"host": "127.0.0.1",
"port": 6600,
"streams_file": "/home/pi/streams.json",
"streamsp_file": "",
"special_ips": "",
"play_local": false
}
$ ls -l /home/pi/streams.json
-rw-r--r-- 1 pi pi 55 mars 25 22:33 /home/pi/streams.json
Thanks for your help
rc2dev commented
This happens because your streamsp_file
is empty and the code didn't handle that situation.
But it should! Just fixed it.
Please pull the repo and try again.