Closed chastell closed 11 years ago
+1, been bitten by it recently.
ok, actually this change does not make everything work. i now get
[2012-08-19 11:36:28] INFO WEBrick 1.3.1
[2012-08-19 11:36:28] INFO ruby 1.9.2 (2011-07-09) [x86_64-linux]
== Sinatra/1.3.2 has taken the stage on 9090 for development with backup from WEBrick
[2012-08-19 11:36:28] INFO WEBrick::HTTPServer#start: pid=6245 port=9090
[2012-08-19 11:36:32] ERROR TypeError: can't convert String into Integer
/home/tomek/.rvm/gems/ruby-1.9.2-p290@showoff/bundler/gems/showoff-6defc51d1588/lib/showoff.rb:66:in `[]'
/home/tomek/.rvm/gems/ruby-1.9.2-p290@showoff/bundler/gems/showoff-6defc51d1588/lib/showoff.rb:66:in `initialize'
/home/tomek/.rvm/gems/ruby-1.9.2-p290@showoff/gems/sinatra-1.3.2/lib/sinatra/base.rb:1329:in `new'
(same with ruby 1.9.3-p194)
+1
A more reliable (albeit temporary) fix would be to set the dependency in the gemspec, e.g.
s.add_dependency "gli","~> 1.2"
or
s.add_dependency "gli","1.6.0"
("gem list -r --all gli" shows that 1.6 was the most recent pre-2.0 release)
Naturally, making it really work with GLI 2.0 would be best.
+1
@tomash: I can’t replicate your case; can you share your showoff.json
file?
+1 !!!
"can't convert string into integer" happens with showoff.json that's just an array (not a hash)
[
{"section":"intro"},
{"section":"rails4"}
]
worked fine previously
I think the array-only version hasn’t been supported for quite a while now. Try
{
"name": "What’s New in Rails 4?",
"sections": [
{"section":"intro"},
{"section":"rails4"}
]
}
yep, did it already and it works indeed
Small fix to make Showoff work with the newly-released GLI 2.0.