'uninitialized constant Rocco' #69
Comments
Just in case, I got it to work by reverting this commit 86b8b85 not just by adding the require for rocco. |
Confirming on Oneiric, Ruby 1.9.2 (p290), Redcarpet 2.0.1, Rocco 0.8.2, Mustache 0.99.4, no Pygments installed. Note that it's |
@passcod does it work for you if you revert the commit? |
@leopic Nope, it errors out as in #57:
Edit: Sorry, my bad. It doesn't work if I revert to 86b8b85, but I didn't try to revert that commit. Reverting to 1a9faa3 (86b8b85's parent) doesn't work either, because it requires an old bluecloth. |
Yep, same thing for me. If I update the references from |
Actually, doing that didn't help much: it now causes a segfault. :( The syntax for creating a new instance and then parsing it is currently I just reverted to 0.8 to get mine working. |
Hmm, I reverted to 0.8, and I am now getting this error: RCC Parse Error: 'api.rb' Line: 1 Column: 1 [error occurred while parsing element] thoughts? |
Confirming on both ruby 1.9.2-p290 and ree-1.8.7-head. Stack traces are the same. |
I think it's something wrong with redcarpet gem:
I will check it more complexly. |
With version 2.0 |
This bug is fixed here: #75 |
@krainboltgreene Yeah. Thanks, Kurtis. |
Although I absolutely think Rocco should move to 2.0. Suggestions? |
@krainboltgreene I think we should focus on issues with tests. I'm a bit worried about #73 and
I'm not sure this error occured before redcarpet was pinned to 1.17. Maybe it's just an error in test assertion. |
I get the error too: bundle exec rocco lib/ruby_katas/chapter01_strings.rb These are my gems:Using diff-lcs (1.1.3) |
I started getting it again as well. Looks like the change got reverted or something? Either way, Doug, you can fix it by explicitly requiring Redcarpet 1.7 Kurtis Rainbolt-Greene: On Monday, January 23, 2012 at 11:44 PM, Doug Ireton wrote:
|
I have the same problem. |
quickfix ---
bin/rocco | 1 +
rocco.gemspec | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/rocco b/bin/rocco
index f630978..e4fac90 100755
--- a/bin/rocco
+++ b/bin/rocco
@@ -14,6 +14,7 @@
require 'optparse'
require 'fileutils'
require 'rocco'
+Markdown = RedcarpetCompat unless defined? Markdown
# Write usage message to stdout and exit.
def usage(stream=$stderr, status=1)
diff --git a/rocco.gemspec b/rocco.gemspec
index c261321..e141539 100644
--- a/rocco.gemspec
+++ b/rocco.gemspec
@@ -52,7 +52,7 @@ Gem::Specification.new do |s|
s.executables = ["rocco"]
s.test_files = s.files.select {|path| path =~ /^test\/.*_test.rb/}
- s.add_dependency 'redcarpet'
+ s.add_dependency 'redcarpet', '~> 2.1'
s.add_dependency 'mustache'
s.has_rdoc = false
--
1.7.9.3 |
@trevor What about tests? |
not a comprehensive patch; just to get it working |
@trevor I mean, does tests runs fine with this patch? As I remember, |
the patch is a hotfix to the executable only, and the tests only call rdiscount. that aside - testing by modifying # require 'rdiscount'
require 'redcarpet'
Markdown = RedcarpetCompat unless defined? Markdown this gives one new failure:
separate issue, but i do get one error in the tests either way with r = Rocco.new( File.dirname(__FILE__) + "/fixtures/issue10.iso-8859-1.rb" ) ... however the utf8 file passes. |
Will this fix be rolled out to the gem? |
+1 for please updating the gem |
/Library/Ruby/Gems/1.8/gems/rocco-0.8.2/lib/rocco.rb:447:in |
I submitted a similar patch to fix the issue in the gem entirely. The test yields errors when comparing the expected HTML output, and I similarly encoding errors crop up from time to time. However, things seem to render properly none the less. Apologies for the shoddy pull. I didn't have time to polish things up entirely. |
Maybe use rdiscount or bluecloth, instead of redcarpet until the code gets fixed? (That's what I did to the source.) |
I get the same error. Am i right that this is not fixed yet? |
same error here- had to revert to the fl-rocco gem. |
Also getting this issue. Windows 7 x64 |
What's the verdict on this. I'm still hitting this issue with a vanilla install of rocco. |
Still broken apparently, anyone know of any other similar gems? |
@mmmurf try fl-rocco |
Fresh install on Ubuntu, I tried running rocco and got this:
$ rocco lib/*.rb /var/lib/gems/1.8/gems/rocco-0.8.2/lib/rocco.rb:447:in
process_markdown': uninitialized constant Rocco::Markdown (NameError)from /var/lib/gems/1.8/gems/rocco-0.8.2/lib/rocco.rb:391:in
highlight' from /var/lib/gems/1.8/gems/rocco-0.8.2/lib/rocco.rb:129:in
initialize'from /var/lib/gems/1.8/gems/rocco-0.8.2/bin/rocco:67:in
new' from /var/lib/gems/1.8/gems/rocco-0.8.2/bin/rocco:67 from /var/lib/gems/1.8/gems/rocco-0.8.2/bin/rocco:66:in
each'from /var/lib/gems/1.8/gems/rocco-0.8.2/bin/rocco:66
from /usr/local/bin/rocco:19:in
load' from /usr/local/bin/rocco:19
Running Rdiscount 1.6.8, Bluecloth 2.2.0, Mustache 0.99.4, Pygments 1.4, Rubygems 1.7.2 and Ruby 1.8.7. Any other info I could provide to make your life easier?
I realise some people were having this issue and talk about it on #57, but for some reason it still doesn't work for me.
Cheers,
Leo
The text was updated successfully, but these errors were encountered: