Hello!
I tried to clone this git repo to modify some HTML output a bit, and use the gem from there inside my Rails 3 application. So I did:
gem 'BBRedCloth', :path => 'vendor/redcloth'
which won't work:
Could not find gem 'BBRedCloth (>= 0)' in source at vendor/redcloth.
Source does not contain any versions of 'BBRedCloth (>= 0)'
Guess because there's no .gemspec here. So what I did was, download the 0.8.4 versioned gem from rubygems.org itself, and well, of course there is a BBRedCloth.gemspec inside the data.tar.gz of the .gem archive.
Copied the contents of the data.tar.gz into the vendor/redcloth, and bundler will do its job. But now, the whole stuff is screwing up.
Showing /home/chipf0rk/RailsProjects/FourRealms/app/views/reports/show.html.erb where line jgarber#17 raised:
wrong number of arguments (1 for 2)
Extracted source (around line jgarber#17):
14: <% end %>
15:
16:
17: <%= raw parse_bb(@report.content) %>
18: <%= link_to "< Back to All News", reports_path, :class => "back" %>
19:
20:
The interesting stacktrace stuff is this:
vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'method_missing' vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'to' vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'to_html' app/helpers/application_helper.rb:25:in 'parse_bb' app/views/reports/show.html.erb:17:in '_app_views_reports_show_html_erb__542381288__613620788_0'
My function to parse the stuff is:
def parse_bb(input) require 'rubygems' gem 'BBRedCloth' require 'RedCloth' RedCloth.new( input, [:bbcode_only] ).to_html end
and to get RedCloth working with BBRedCloth at all, I got this in my Gemfile.
gem 'RedCloth', '4.2.4' gem 'BBRedCloth', :path => 'vendor/redcloth'
- these two were working perfectly together when I had it directly from the gem source.
Hope you can fix this, because I got to modify some parsing behavior in there... ;)
Thanks for the nice gem here so far, it seems to be the first good BBCode parser for Ruby/Rails that I have found yet.
Cheers!
Simon
Hello!
I tried to clone this git repo to modify some HTML output a bit, and use the gem from there inside my Rails 3 application. So I did:
gem 'BBRedCloth', :path => 'vendor/redcloth'
which won't work:
Guess because there's no .gemspec here. So what I did was, download the 0.8.4 versioned gem from rubygems.org itself, and well, of course there is a BBRedCloth.gemspec inside the data.tar.gz of the .gem archive.
Copied the contents of the data.tar.gz into the vendor/redcloth, and bundler will do its job. But now, the whole stuff is screwing up.
The interesting stacktrace stuff is this:
vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'method_missing' vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'to' vendor/redcloth/lib/case_sensitive_require/./redcloth/textile_doc.rb:174:in 'to_html' app/helpers/application_helper.rb:25:in 'parse_bb' app/views/reports/show.html.erb:17:in '_app_views_reports_show_html_erb__542381288__613620788_0'My function to parse the stuff is:
def parse_bb(input) require 'rubygems' gem 'BBRedCloth' require 'RedCloth' RedCloth.new( input, [:bbcode_only] ).to_html endand to get RedCloth working with BBRedCloth at all, I got this in my Gemfile.
gem 'RedCloth', '4.2.4' gem 'BBRedCloth', :path => 'vendor/redcloth'Hope you can fix this, because I got to modify some parsing behavior in there... ;)
Thanks for the nice gem here so far, it seems to be the first good BBCode parser for Ruby/Rails that I have found yet.
Cheers!
Simon