header': wrong number of arguments (3 for 2) (ArgumentError)
mranostay opened this issue · comments
Current build of 0.1.10 fails on both an Ubuntu and MacPorts system here
mranostay@niteshade:$ sudo gem install vimdeck$ vimdeck ~/slides.md
...
mranostay@niteshade:
/var/lib/gems/1.9.1/gems/vimdeck-0.1.10/lib/vimdeck.rb:79:in header': wrong number of arguments (3 for 2) (ArgumentError) from /var/lib/gems/1.9.1/gems/vimdeck-0.1.10/lib/vimdeck.rb:149:in
render'
from /var/lib/gems/1.9.1/gems/vimdeck-0.1.10/lib/vimdeck.rb:149:in block in generate' from /var/lib/gems/1.9.1/gems/vimdeck-0.1.10/lib/vimdeck.rb:146:in
each'
from /var/lib/gems/1.9.1/gems/vimdeck-0.1.10/lib/vimdeck.rb:146:in generate' from /var/lib/gems/1.9.1/gems/vimdeck-0.1.10/lib/vimdeck.rb:234:in
start'
from /var/lib/gems/1.9.1/gems/vimdeck-0.1.10/bin/vimdeck:67:in <top (required)>' from /usr/local/bin/vimdeck:23:in
load'
from /usr/local/bin/vimdeck:23:in `
I'm having the same issue.
Yep, here too. Only when I have a header in the document, obviously.
/home/oliver/.gem/ruby/2.1.0/gems/vimdeck-0.2.0/lib/vimdeck.rb:87:in `header': wrong number of arguments (2 for 3) (ArgumentError)
from /home/oliver/.gem/ruby/2.1.0/gems/vimdeck-0.2.0/lib/vimdeck.rb:157:in `render'
from /home/oliver/.gem/ruby/2.1.0/gems/vimdeck-0.2.0/lib/vimdeck.rb:157:in `block in generate'
from /home/oliver/.gem/ruby/2.1.0/gems/vimdeck-0.2.0/lib/vimdeck.rb:154:in `each'
from /home/oliver/.gem/ruby/2.1.0/gems/vimdeck-0.2.0/lib/vimdeck.rb:154:in `generate'
from /home/oliver/.gem/ruby/2.1.0/gems/vimdeck-0.2.0/lib/vimdeck.rb:242:in `start'
from /home/oliver/.gem/ruby/2.1.0/gems/vimdeck-0.2.0/bin/vimdeck:66:in `<top (required)>'
from /home/oliver/.gem/ruby/2.1.0/bin/vimdeck:23:in `load'
from /home/oliver/.gem/ruby/2.1.0/bin/vimdeck:23:in `<main>'
Ran gem install redcarpet
, which I think is now at 3.1.1, and it worked perfectly. Might be down to conflicting redcarpet versions then? I use Octopress too.
I need to fix the Gemfile to specify explicit versions of the dependencies. Sorry for this guys. I'll try to get this fix in soon
No worries, I put up a quick post in the meantime detailing my problem and the fix though. Vimdeck is a great tool, I think you can be forgiven for a small problem that's easy to work around!
Awesome! Thanks for the feedback man. And for writing the post! Glad you're getting some use out of it. BTW, I dig the mapping that you're using here: https://github.com/Wolfy87/project-wide-operations/blob/master/.lvimrc
I've added some other hacks on top of basic vimdeck. You can take a look at my recent presentation here and my custom startup script here.
The ascii art stuff wasn't working so well for me, so I came up with a way to save a hand-made ascii art slide and replace after vimdeck is done with its generation. Also using some syntax highlighting tricks to "color" some of the images. You can see the result here.
The same error occurred when generating presentations using slides.md
, my os is OSX 10.9.3.
error stack
$ vimdeck slides.md
/Users/dylanninin/.rvm/gems/ruby-2.1.1/gems/vimdeck-0.2.1/lib/vimdeck.rb:87:in `header': wrong number of arguments (2 for 3) (ArgumentError)
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/gems/vimdeck-0.2.1/lib/vimdeck.rb:157:in `render'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/gems/vimdeck-0.2.1/lib/vimdeck.rb:157:in `block in generate'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/gems/vimdeck-0.2.1/lib/vimdeck.rb:154:in `each'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/gems/vimdeck-0.2.1/lib/vimdeck.rb:154:in `generate'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/gems/vimdeck-0.2.1/lib/vimdeck.rb:242:in `start'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/gems/vimdeck-0.2.1/bin/vimdeck:78:in `<top (required)>'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/bin/vimdeck:23:in `load'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/bin/vimdeck:23:in `<main>'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
from /Users/dylanninin/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
ruby version
$ rvm list
rvm rubies
ruby-1.9.3-p545 [ x86_64 ]
* ruby-2.0.0-p451 [ x86_64 ]
=> ruby-2.1.1 [ x86_64 ]
# => - current
# =* - current && default
# * - default
redcarpet version
$ gem list redcarpet
*** LOCAL GEMS ***
redcarpet (3.1.2)
It seems that redcarpet 3.1.2 requires header
function to have two parameters. See vmg/redcarpet@64f717e
Nice catch @npcode! At one point I was using a version of redcarpet that had only 2 arguments for header... I thought the newer version required 3. I bumped the required version. Let me know if this still doesn't work for you guys!