Running staticmatic preview command results in webrick error

15 views
Skip to first unread message

BobTodd

unread,
Dec 16, 2010, 6:49:55 AM12/16/10
to StaticMatic
Any pointers for fixing the following would be appreciated.

staticmatic preview agileapps
Site root is: agileapps
StaticMatic Preview Server
Ctrl+C to exit
[2010-12-16 11:42:24] INFO WEBrick 1.3.1
[2010-12-16 11:42:24] INFO ruby 1.8.7 (2010-01-10) [i486-linux]
/usr/lib/ruby/1.8/webrick/utils.rb:63:in `getaddrinfo': getaddrinfo:
Name or service not known (SocketError)
from /usr/lib/ruby/1.8/webrick/utils.rb:63:in `create_listeners'
from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'
from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'
from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/handler/
webrick.rb:10:in `new'
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/handler/
webrick.rb:10:in `run'
from /usr/lib/ruby/gems/1.8/gems/staticmatic-0.11.1/bin/../lib/
staticmatic/server.rb:62:in `start'
from /usr/lib/ruby/gems/1.8/gems/staticmatic-0.11.1/bin/../lib/
staticmatic/mixins/server.rb:5:in `preview'
from /usr/lib/ruby/gems/1.8/gems/staticmatic-0.11.1/bin/../lib/
staticmatic/base.rb:71:in `send'
from /usr/lib/ruby/gems/1.8/gems/staticmatic-0.11.1/bin/../lib/
staticmatic/base.rb:71:in `run'
from /usr/lib/ruby/gems/1.8/gems/staticmatic-0.11.1/bin/
staticmatic:16
from /usr/bin/staticmatic:19:in `load'
from /usr/bin/staticmatic:19

BobTodd

unread,
Dec 16, 2010, 11:12:26 AM12/16/10
to StaticMatic
having rolled my sleeves up and debugged my first ruby app, i find
this spurious line:

host = staticmatic.configuration.preview_server_host || ""

not much point in "" as a default, so then it was a case of tracing
where to set staticmatic.configuration.preview_server_host

the docs say "You can put a file called configuration.rb in your
staticmatic project's basedir/src directory"

but follow this for why that doesnt work and the solution:
https://github.com/staticmatic/staticmatic/pull/17
Reply all
Reply to author
Forward
0 new messages