tag:support.markedapp.com,2011-09-11:/discussions/problems/245-marked-doesnt-appear-to-be-using-the-custom-markdown-processorMarked: Discussion 2012-03-31T06:01:13Ztag:support.markedapp.com,2011-09-11:Comment/146454112012-03-21T01:11:27Z2012-03-21T01:11:27ZMarked doesn't appear to be using the custom Markdown Processor<div><p>If Marked doesn't like the script for any reason, it skips using
it. This is usually just because of the path name (it's a little
more flexible in the next version). What is the full path to your
script? Are there any non alpha-numeric characters or spaces in
it?</p>
<p>Also, make sure you <code>chmod a+x</code> the script if you
haven't already.</p>
<p>Let me know if that helps at all, we'll keep troubleshooting if
needed.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/146454112012-03-21T01:25:02Z2012-03-21T01:25:03ZMarked doesn't appear to be using the custom Markdown Processor<div><p>Thanks for the fast reply Brett,</p>
<p>I double checked my path (no alpha numerics, or spaces) and the
permissions on the ruby script and things appear to be working
smoothly now.</p>
<p>I can't figure out if I had the path wrong or the permissions
misaligned, but I'm up and running now.</p>
<p>FWIW, a log message in the console mentioning that Marked was
ignoring the custom processor might be handy for situations like
this.</p>
<p>Cheers,</p></div>Jesse Collistag:support.markedapp.com,2011-09-11:Comment/146454112012-03-21T01:32:56Z2012-03-21T01:32:56ZMarked doesn't appear to be using the custom Markdown Processor<div><p>Agreed. Maybe even a UI indicator that lets you know if it
found/likes<br>
the script. I'll work something in.</p>
<p>Glad to hear it's up and running!</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T02:49:31Z2012-03-31T02:49:32ZMarked doesn't appear to be using the custom Markdown Processor<div><p>I have the same problem with you but still cannot solve the
ploblem.<br>
I'm sure the path is
ok(<code>/Users/maple/dotfiles/bin/gm.rb</code>) and permeitions
are right</p>
<p><code>bash -rwxr-xr-x 1 maple staff 1463 Mar 31 01:27
/Users/maple/dotfiles/bin/gm.rb</code></p>
<p><code>cat README.md | github-flavored-markdown.rb >
output.html</code> will also generate the right html file, but
Marked still do not use the script and left empty.</p></div>mapletag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T03:56:39Z2012-03-31T03:56:39ZMarked doesn't appear to be using the custom Markdown Processor<div><p>The preview comes up empty, or comes up with the default
output?</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T04:00:20Z2012-03-31T04:00:20ZMarked doesn't appear to be using the custom Markdown Processor<div><p>You can see the picture that i upload in the repley, It show
nothing</p></div>Mapletag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T04:06:14Z2012-03-31T04:06:14ZMarked doesn't appear to be using the custom Markdown Processor<div><p>Then it's running the custom script, it's just not getting good
data back.</p>
<ol>
<li>Can you send me the file you get when you run it on the command
line so I can see if the output might cause conflicts with
Marked?</li>
<li>Can you check in console.app for any error messages that might
show up when you open a file in Marked?</li>
</ol>
<p>Thanks,<br>
Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T04:28:47Z2012-03-31T04:28:47ZMarked doesn't appear to be using the custom Markdown Processor<div><p>when i run it in console, the error msg show as follows:</p>
<p>2012-03-31 12:17:12.516 Marked[9255:707] {</p>
<pre>
<code>PATH =</code>
</pre>
<p>
"/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/maple/programming/js/gitit-bootstrappifier";</p>
<pre>
<code>PWD = "/Users/maple/programming/js/gitit-bootstrappifier";</code>
</pre>
<p>}
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
<code>gem_original_require': no such file to load -- redcarpet
(LoadError) from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in</code>require'
from /Users/maple/dotfiles/bin/gm.rb:18</p></div>Mapletag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T04:37:22Z2012-03-31T04:37:22ZMarked doesn't appear to be using the custom Markdown Processor<div><p>So Marked isn't finding your redcarpet gem. Are you using rvm?
You need to make sure that the gem is installed for the system ruby
(1.8), or you need to add a line to the script to have it use a
different ruby. If your hashbang is #!/usr/bin/env ruby, it's going
to run the wrong one because Marked's custom processor shell
doesn't inherit your user environment.</p>
<p>Let me know if it's an rvm issue and I can try to debug in that
direction with you. If it's not, and doing a regular <code>sudo gem
install redcarpet</code> doesn't fix the issue, let me know about
any peculiarities in your Ruby setup and I'll see what I can figure
out.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T04:52:41Z2012-03-31T04:52:41ZMarked doesn't appear to be using the custom Markdown Processor<div><p>when i use the system ruby to exec the script, an error
occured:<br>
/usr/bin/ruby ~/dotfiles/bin/gm.rb</p>
<pre>
<code> ✘</code>
</pre>
<p>
/Users/maple/.rvm/gems/ruby-1.9.2-p318/gems/ffi-1.0.11/lib/ffi_c.bundle:
[BUG] Segmentation fault ruby 1.8.7 (2010-01-10 patchlevel 249)
[universal-darwin11.0]</p>
<p>[1] 15206 abort /usr/bin/ruby ~/dotfiles/bin/gm.rb</p>
<p>so i change the hashbang to</p>
<h1>!/Users/maple/.rvm/rubies/ruby-1.9.2-p318/bin/ruby</h1>
<p>still the problem</p>
<p>2012-03-31 12:50:22.286 Marked[15461:707] {</p>
<pre>
<code>PATH =</code>
</pre>
<p>
"/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/maple/programming/js/gitit-bootstrappifier";</p>
<pre>
<code>PWD = "/Users/maple/programming/js/gitit-bootstrappifier";</code>
</pre>
<p>}
/Users/maple/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
<code>require': no such file to load -- redcarpet (LoadError) from
/Users/maple/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in</code>require'
from /Users/maple/dotfiles/bin/gm.rb:18:in `'</p></div>Mapletag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T05:14:00Z2012-03-31T05:14:00ZMarked doesn't appear to be using the custom Markdown Processor<div><p>Ok. Unless you want to modify your script to work with 1.8,
you're going to need to add the environment variables for rvm
manually. I don't know enough about rvm to say the easiest way to
do this. You may be able to just source an rvmrc file at the start
of the script, but I'm not sure. I do know that setting some env
variables in the script might help…</p>
<p>Run the following as a script on your command line and copy the
output into the beginning of your script. Make sure the hashbang in
your script is back to #!/usr/bin/env ruby and try it out. Let me
know if it helps.</p>
<pre>
<code>#!/usr/bin/env ruby
puts %Q{ENV['PATH'] = "#{ENV['PATH']}"}
puts %Q{ENV['GEM_HOME'] = "#{ENV['GEM_HOME']}"}
puts %Q{ENV['GEM_PATH'] = "#{ENV['GEM_PATH']}"}
puts %Q{ENV['BUNDLE_PATH'] = "#{ENV['BUNDLE_PATH']}"}</code>
</pre>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T05:51:55Z2012-03-31T05:51:55ZMarked doesn't appear to be using the custom Markdown Processor<div><p>problem solved!!!<br>
I change to system ruby and reinstall all those gems and everything
is ok<br>
now :)</p>
<p>rvm use system<br>
sudo gem install redcarpet albino nokogiri pygments.rb</p></div>Mapletag:support.markedapp.com,2011-09-11:Comment/146454112012-03-31T06:00:58Z2012-03-31T06:00:58ZMarked doesn't appear to be using the custom Markdown Processor<div><p>Cool, glad it worked out :).</p>
<p>-Brett</p></div>Brett