Github flavored markdown as custom processor
Hi, using the directions http://support.markedapp.com/kb/how-to-tips-and-tricks/using-marked... and https://github.com/alampros/Docter/blob/master/bin/github-flavored-... , I keep getting the following error in the Console when I try to use the ruby script:
[0x0-0x5d15d1].com.brettterpstra.marky: /usr/local/bin/github-flavored-markdown.rb:24:in `markdown': undefined method `new' for Redcarpet:Module (NoMethodError)
[0x0-0x5d15d1].com.brettterpstra.marky: from /usr/local/bin/github-flavored-markdown.rb:36
At first I tried running the ruby script directly from the command line, and I got the same error, then I realized that it requires redcarpet < 2.0, so I uninstalled that gem and reinstalled 1.17.2, and now I can successfully run the ruby script against a markdown file at the command line and get the formatted html. But within Marked it still gives the same error. I'm set to use ruby 1.9.2 as my default, could it be a version issue? I tried quitting and restarted Marked, same result. Any ideas?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 27 Jan, 2012 03:15 AM
Where's your ruby binary located? Marked looks specifically for /usr/bin/ruby right now and can't read RVM environments yet, so it's probably running whatever version you have as system base, which is likely a conflict with what you run on the command line.
2 Posted by Brian Billman on 27 Jan, 2012 03:38 AM
That did it, thanks! I just reverted ruby back with `rvm use system`
and all is well. A note on that *Github flavored markdown as custom
processor* page about the ruby version/location might be helpful.
Thanks again!
Brian
Support Staff 3 Posted by Brett on 27 Jan, 2012 08:05 AM
Glad it worked! I'll add a note :).
Brett closed this discussion on 27 Jan, 2012 08:05 AM.
Brian Billman re-opened this discussion on 27 Jan, 2012 03:04 PM
4 Posted by Brian Billman on 27 Jan, 2012 03:04 PM
Just wanted to give an update, after some more poking around. I now think the problem was that the system ruby was missing the redcarpet gem, but because I had used rvm to change my default ruby install, when I installed the gems, they gem were associated with the rvm ruby install. Once I switched back to the system ruby and installed the gems, Marked found everything it needed, and rvm can be used to switch back to another version.
Moral of the story: make sure that all the required gems are installed under system ruby! (i.e. if you're using rvm, switch back to system ruby
rvm use system
and install the gems, then you can switch back to your ruby version of choice)Brett closed this discussion on 26 Aug, 2012 09:03 PM.