Closed mparsani closed 11 years ago
Are you using the new embedded rack server command?
bundle exec ruhoh server 9292
if you use the old:
bundle exec rackup -p 9292
it will require the config.ru file.
Thanks Jade for the prompt reply. If I use bundle exec ruhoh server 9292 I get
bundle exec ruhoh server 9292
/usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/parse.rb:28:in rescue in page_file': Error trying to read meta-data from /home/matteo/my-website/ruhoh-site/theme-bootstrap-2/media/glyphicons-halflings.png. Check your folder configuration. Error details: invalid byte sequence in UTF-8 (RuntimeError) from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/parse.rb:19:in
page_file'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/model.rb:104:in parse_page_file' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/model.rb:60:in
process'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/model.rb:18:in data' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/model_view.rb:12:in
initialize'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/collection.rb:207:in new' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/collection.rb:207:in
load_model_view'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/collection.rb:30:in find' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/collection.rb:39:in
block in dictionary'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/collection.rb:37:in each' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/base/collection.rb:37:in
dictionary'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/resources/pages/collection.rb:6:in routes' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/routes.rb:24:in
block in all'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/routes.rb:23:in each' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/routes.rb:23:in
all'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/programs/preview.rb:26:in preview' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/client.rb:122:in
server'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/lib/ruhoh/client.rb:40:in initialize' from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/bin/ruhoh:34:in
new'
from /usr/local/lib/ruby/gems/2.0.0/gems/ruhoh-2.5/bin/ruhoh:34:in <top (required)>' from /usr/local/bin/ruhoh:23:in
load'
from /usr/local/bin/ruhoh:23:in `
you have to enable the new theme:
config.yml
"theme-bootstrap-2" :
"use": "theme"
Restart the web-server after this change. I know these errors are super cryptic =/. Basically ruhoh is trying to parse your theme folder as a normal pages collection and so it's reading the binary images files as text files and blowing up.
Great, it works! I would add a small comment in the documentation regarding the following two commands:
bundle exec ruhoh server 9292 (which does not require config.ru)
and
bundle exec rackup -p 9292 (which requires config.ru)
However, since now the user can just us " bundle exec ruhoh server 9292" without config.ru, maybe you can just cite this new command.
Regarding the cyptic error: I did enable the new theme before but I got that error. Do spaces matter in the config.yml?
Thanks Jade!
note that you do not need to specify 9292 either. The command will run fine with just bundle exec ruhoh serve
Hello, I am following literally the instruction given at http://ruhoh.com/docs/2/
Everything works fine till "Add content".
When I try to use the theme theme-bootstrap-2.git and I restart the rack (bundle exec rackup -p 9292 ) I get the following error:
configuration /home/matteo/my-website/ruhoh-site/config.ru not found
I have see that in some old version of ruhoh one has to create config.ru whereas in the 2.5 doc this is not stated.
My OS is Ubuntu 12.10 and I got ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
The content of the Gemfile.lock is:
GEM remote: https://rubygems.org/ specs: directory_watcher (1.4.1) mini_portile (0.5.1) mustache (0.99.4) nokogiri (1.6.0) mini_portile (~> 0.5.0) rack (1.5.2) redcarpet (2.3.0) ruhoh (2.5) directory_watcher (~> 1.4.0) mustache (~> 0.99) nokogiri (~> 1.5) rack (~> 1.4) redcarpet (~> 2.1)
PLATFORMS ruby
DEPENDENCIES ruhoh (~> 2)
Any idea what I am doing wrong?
Thank you.