similar to: Bug: NoMethodError: private method `gsub'' called for nil:NilClass

Displaying 20 results from an estimated 2000 matches similar to: "Bug: NoMethodError: private method `gsub'' called for nil:NilClass"

2006 Sep 18
2
RedCloth !image! bug with filter_html
Hi all! I am trying tu set up RedCloth for user-submitted comments. And here is my problem. The :filter_html option just breaks images :-( For example, if I try in irb: string= "Some textile !agif.gif! and textile again" RedCloth.new(string, [:filter_html, :filter_styles]).to_html(:textile) I get: NoMethodError: You have a nil object when you didn''t expect it! The error
2010 Apr 13
1
BBCode Fork of RedCloth
how do you install this? especially on rails 3? putting gem "redcloth", :git => "git://github.com/ROFISH/redcloth.git" doesn''t work. and do nested tags like [quote][quote][/quote][/quote] work? -- Posted via http://www.ruby-forum.com/.
2007 Jan 28
1
^SUPER^ _RED_ ~CLOTH~ 1.153
New gems (source and win32): gem install superredcloth --source http://code.whytheluckystiff.net Use it like: SuperRedCloth.new("_huh?_").to_html Okay, getting close! A lot more tests are passing. There are still about 50 tests failing. Most of these are due to ol/ul list problems. Here''s what''s still broken: * Options (:hard_breaks, :filter_html, etc.) *
2005 Nov 22
1
Patches?
I have a few of patches for RC. A quick fix for a bug in clean_html, an improvement to clean_html to sanitize more links, and the addition of "filter_classes" and "filter_ids". What should I do? Email them to someone? why? (sorry, couldn''t avoid it) I actually don''t have separate patches for each, but could do them if needed. The first two are
2006 Feb 27
12
RedCloth
Is this the prefered method to implement RedCloth in your views. I''m trying to display user input that will sometimes have code references in it. This strips out all tags. I would like for the tags to be displayed but not read as html. Thanks in advance! <%= RedCloth.new(strip_tags(comment.comment),[:filter_html]).to_html %> charlie bowman recentrambles.com -- Posted via
2006 Aug 04
0
Hard break broken in 3.0.4?
Is :hard_break working in RedCloth 3.0.4? $ ruby -v ruby 1.8.4 (2005-12-24) [i686-linux] $ pwd /lib/ruby/gems/1.8/gems/RedCloth-3.0.4/lib $ irb irb(main):001:0> require ''redcloth'' => true irb(main):002:0> rc = RedCloth.new("h1. Heading\n\n_Not_ heading.") => "h1. Heading\n\n_Not_ heading." irb(main):003:0>
2007 Jan 23
7
RedCloth and SuperRedCloth
Good day to the parliament of RedCloth followers gathered here. Grave matters at hand!! I''m personally quite unhappy with the state of RedCloth and am reluctant to release the code in the repository. I can''t say if the code works with any confidence because I can''t generate the (Poignant) Guide with the current RedCloth. I know some things are fixed, but I''m
2005 May 24
3
textilize/markdown/sanitize for messageboards, oh my!
Hullo, fellow Railsers! (warning: this isn''t a 100% Rails specific question, but I guess it very much applies to what a lot of us are currently doing.) For a project that involves messageboard functionality I''m looking for a good way of sanitizing user input, so the silly fools, err, my wonderful users don''t mess things up too much. I''ve played around with
2006 May 27
0
:filter_html and :hard_breaks makes <br> ...weird
hi! never posted to a mailing list before so I hope this is an appropriate use. Love redcloth btw! I guess I just have a bug report though... if I turn on hard_breaks and filter_html, all the <br />s turn into <br>s. weird. For now I''m just doing this which is fine: textilized = RedCloth.new(text, [ :filter_html, :hard_breaks ]) return
2007 Mar 08
2
Rendering a view from a model
Hi peoples. I have the following class method in a Rails model, in which I retrieve some objects from the DB... @bubbles = Bubble.find(:all, :limit => 30) # What is the limit? open( "public/xml_data/main_data_feed.xml", "w" ) { | l | l.write ERB.new( IO.read( File.join( RAILS_ROOT, "app/views/rssfeed/bubbles.rhtml" ) ) ).result } When I attempt to run this
2007 Aug 29
0
Patch - bug fix for RedCloth when using !image! and :filter_html in combination
RedCloth.new("!image!", [:filter_html]).to_html will cause the following error: "error occurred while evaluating nil.gsub" This patch will fix it. Can you apply this please to next release of RedCloth? Thanks! Tim --- redcloth_old.rb 2007-08-29 17:02:51.537099600 -0600 +++ redcloth.rb 2007-08-29 17:04:34.666099600 -0600 @@ -1115,7 +1115,7 @@
2007 Jul 16
6
Advice regarding extending RedCloth
Hello, I am in a bit of a bind. I need to reliably parse mediawiki markup to html, and the only parser that I can find (mediacloth) has a lot to be desired, so I would like to extend something that works and parse mediawiki markup. My question to this list is should I start working on RedCloth or SuperRedCloth or is there a difference as far as extending them? Also does anyone know of a write up
2006 Oct 03
8
Ferret install, rake failing on make
I''m currently trying to install the latest version of Ferret (0.10.9) on my Ubuntu Dapper (6.06) system. I have tried the gem, but it does not generate the ferret_ext.so file. Ideally I would prefer to install from the gem, but if source works, I''m fine with that too. I am now trying an install from source, but when I run the command ''$ rake ext'' I get the
2006 Feb 28
0
help with sanitizing html (comments in blog)
I''ve added this method in my model which is called with each save. It does a good job getting rid of html tags and then emplementing RedCloth. I''m very new at blogs so I''m not sure if this is adequate or not for comments. What do you think? I would love to hear if this is safe, unsafe, or just plain bad form. Also, I don''t think that RedCloth is
2011 Jan 13
9
spurious <li> generated when list followed by 3
RedCloth master generates a spurios <li> element when a numbered or undumbered list is followed by three or more newlines. RedCloth.new("* one\n* two\n* three \n\n\n").to_html #=> "<ul>\n\t<li>one</li>\n\t<li>two</li>\n\t<li>three</li>\n</ul>\n<li>" # note extra trailing <li> outside <ul> A colleague
2006 Jan 27
9
RedCloth Hard Breaks
Has anybody gotten :hard_breaks to work with RedCloth? I''m doing: self.body_html = RedCloth.new(self.body).to_html(:textile) which works, except that it doesn''t transform hard breaks to <br /> tags, which is really important for me. However, if I do: self.body_html = RedCloth.new(self.body, [ :hard_breaks ]).to_html(:textile) then it converts ALL breaks into <br
2006 Jun 14
7
CR issue
Hi, I am using RedCloth (3.0.4). First using online text2html (http://www.textism.com/tools/textile/) , "123 456" returns <p>123<br />456</p> But by code: <code> require ''RedCloth'' puts RedCloth.new("123\n456").to_html </code> I got: <p>123 456</p> CR is not taken in consideration. Is there any parameter I am
2007 Jan 16
1
<BR> and <P> in RedCloth v. Textism
Hi, I''m using RedCloth right now for some simple markup in a Rails project. It''s simple and easy - thanks for a great tool! I have a question about an apparent discrepancy between RedCloth and Textile, relating to newline characters. I''ve played with the "hard_breaks" feature and that seems to generate it''s own problems.. If I go onto the Textile
2006 Jan 27
10
html special characters. h() failure.
I was trying to convert a some text with the (r) character it so it replaced character \xAE with &reg; h(@item.description) didn''t do anything. I need to use @item.description.grep(/\xAE/,''&reg;'') for it to work. I think the h() function should be able to do all the codes that are available. Regards Neil.
2008 May 13
4
hard_breaks issues
Hello, I''m new to this list, so first of all, many thanks to RedCloth''s developers, it really helps me in many ruby apps :-) I post here because I''d like to have a clear view on "hard_breaks" related issues. I saw old references on the web and on the archives on this ML, I''d like a fresh view ! It seems that RedCloth 3.0.4 does not handle