bluecloth

Bluecloth v2.0.10 with windows 7 not working

陌路散爱 提交于 2020-01-23 05:49:26
问题 WIth Ruby 187, I had downloaded devkit from http://rubyinstaller.org/downloads and followed the instruction per https://github.com/oneclick/rubyinstaller/wiki/Development-Kit. I had also ensured that devkit is installed properly by following smoke test. I had then tried installing bluecloth (v2.0.10). It had failed with following error: C:\test\typo>gem install bluecloth --platform=ruby Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while...

displaying markdown in my textarea

99封情书 提交于 2020-01-04 06:39:52
问题 I'm using BlueCloth to create html from markdown from the content my users enter into a textarea like this: def create @post = Post.new(params[:post]) do |post| body = BlueCloth.new(post.body) post.body = body.to_html end ... end This works great! I get the html stored in the database fine, But how do I show markdown in the textarea when the user edits? I tried: def edit @post = Post.find(params[:id]) @post.body = BlueCloth.new(@post.body) @post.body.text end The output in my textarea looks

Installing Publify with bundle install, error on bluecloth gem

早过忘川 提交于 2020-01-02 04:09:52
问题 I'm trying to install Publify web blog CMS 6.0.9 for Ruby on Rails 3.1 on Windows. Every time I try to bundle install Publify, I get the same error message when installing the bluecloth gem: C:\Users\Lunasea\Downloads\typo-6.0.9>gem install bluecloth Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing bluecloth: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb checking

ruby - Error with installing bluecloth-2.2.0 gem in Win 7 , ruby 1.9.3

…衆ロ難τιáo~ 提交于 2019-12-11 23:12:04
问题 Was following steps described in https://stackoverflow.com/a/13544086/3206440 for resolving error with bluecloth-2.2.0 gem installation in windows 7. Encountered an error in step 4 given in the above link - any ideas? Console output below. C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\bluecloth-2.2.0>rake gem C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bluecloth-2.2.0/Rakefile:24 : Use RbConfig instead of obsolete and deprecated Config. Defaulting gemspec to MIT license. Call

Unable to install or update Ruby bluecloth gem on Windows Ruby 1.9.2

♀尐吖头ヾ 提交于 2019-12-05 21:43:01
I'm getting an error message while trying to update my version of bluecloth gem on Windows. Is there a different version that I need to install for Windows or an alternative to bluecloth that I can use? Unfortunately my development environment is strictly Windows due to other software I work with, otherwise I'd use a Linux environment. Here's a copy paste of what I get: C:\Users\Developer1>gem update Updating installed gems Updating bluecloth Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing bluecloth: ERROR: Failed

Bluecloth v2.0.10 with windows 7 not working

自作多情 提交于 2019-12-05 04:55:15
WIth Ruby 187, I had downloaded devkit from http://rubyinstaller.org/downloads and followed the instruction per https://github.com/oneclick/rubyinstaller/wiki/Development-Kit . I had also ensured that devkit is installed properly by following smoke test. I had then tried installing bluecloth (v2.0.10). It had failed with following error: C:\test\typo>gem install bluecloth --platform=ruby Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing bluecloth: ERROR: Failed to build gem native extension. c:/Ruby187/bin/ruby.exe

BlueCloth isn't working with Rails 3

人盡茶涼 提交于 2019-12-03 13:38:46
问题 Is BlueCloth compatible with Rails 3? I can't make it work, maybe someone uses it? There is supposed to be a helper called 'markdown' available in the views after requiring 'bluecloth', but this doesn't seem to be available. 回答1: I'm upgrading an app to rails3 right now and it worked fine for me. I use a helper function called "format" in templates though the code below also provides a markdown function (in rails3 you'll have to use that with raw()). Here's the contents of my [project]/app

Get underlined text with Markdown

萝らか妹 提交于 2019-12-03 04:00:43
问题 I am using BlueCloth as a Markdown library for Ruby, and I can't find any syntax for getting a text underlined. What is it? 回答1: Markdown doesn't have a defined syntax to underline text. I guess this is because underlined text is hard to read, and that it's usually used for hyperlinks. 回答2: Another reason is that <u> tags are deprecated in XHTML and HTML5, so it would need to produce something like <span style="text-decoration:underline">this</span> . (IMHO, if <u> is deprecated, so should be

Get underlined text with Markdown

萝らか妹 提交于 2019-12-02 17:22:38
I am using BlueCloth as a Markdown library for Ruby, and I can't find any syntax for getting a text underlined. What is it? Markdown doesn't have a defined syntax to underline text. I guess this is because underlined text is hard to read, and that it's usually used for hyperlinks. Another reason is that <u> tags are deprecated in XHTML and HTML5, so it would need to produce something like <span style="text-decoration:underline">this</span> . (IMHO, if <u> is deprecated, so should be <b> and <i> .) Note that Markdown produces <strong> and <em> instead of <b> and <i> , respectively, which

Markdown to plain text in Ruby?

这一生的挚爱 提交于 2019-11-30 21:58:37
问题 I'm currently using BlueCloth to process Markdown in Ruby and show it as HTML, but in one location I need it as plain text (without some of the Markdown). Is there a way to achieve that? Is there a markdown-to-plain-text method? Is there an html-to-plain-text method that I could feel the result of BlueCloth? 回答1: RedCarpet gem has a Redcarpet::Render::StripDown renderer which "turns Markdown into plaintext". Copy and modify it to suit your needs. Or use it like this: Redcarpet::Markdown.new