Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6564525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:58:39+00:00 2026-05-25T13:58:39+00:00

I followed the Railscasts episode about adding code highlighting to an app using Redcarpet,

  • 0

I followed the Railscasts episode about adding code highlighting to an app using Redcarpet, Albino, and Pygments. It works as expected in development. On my test production server, however, I receive the following error:

ActionView::Template::Error (No such file or directory - posix_spawnp):
13:         <div class="small_meta">
14:             Posted on <%= @article.created_at %> by <%= @article.user.full_name %>. Topics: <%= @article.topic_list %>
15:         </div>
16:         <%= markdown(@article.body) %>
17:     </div>
18: 
19: <% else %>
app/helpers/application_helper.rb:19:in `block in syntax_highlighter'
app/helpers/application_helper.rb:18:in `syntax_highlighter'
app/helpers/application_helper.rb:13:in `markdown'
app/views/home/index.html.erb:16:in `_app_views_home_index_html_erb___3638324493742336500_70112578553660'

The error comes from the markdown() helper on line 16. The helper code is:

def markdown(text)
  options = [:hard_wrap, :filter_html, :autolink, :no_intraemphasis, :fenced_code, :gh_blockcode]
  syntax_highlighter(Redcarpet.new(text, *options).to_html).html_safe
end

def syntax_highlighter(html)
    doc = Nokogiri::HTML(html)
    doc.search("//pre[@lang]").each do |pre|
      pre.replace Albino.colorize(pre.text.rstrip, pre[:lang])
    end
    doc.to_s
end

The problem is from the call to Albino. I’m at a loss as to how to fix this problem. It appears that Albino is unable to spawn the pygmentize process. When I run which pygmentize in Terminal.app, I see /usr/local/bin/pygmentize. /usr/local/bin appears in my paths when I run echo $PATH. The test production server is Apache/Phusion Passenger on OS X 10.7 Server.

What is going on here and how can I fix the posix_spawnp error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:58:39+00:00Added an answer on May 25, 2026 at 1:58 pm

    I got the same error and fixed it by installing pygmentize. Make sure that you installed pygmentize into the correct Python interpreter. I’m running OS X 10.7 and I have 4 different python interpreters! You can find out which python you are actively running by typing

    python --version

    Also check read/write permissions on all pertinent directories, i.e. ‘/Library/Python/2.7/site-packages’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Followed this question about delayed_job and monit Its working on my development machine. But
I followed the Railcast #253 http://railscasts.com/episodes/253-carrierwave-file-uploads and works great. But then I implemented it
I have followed the following railscast about adding pdfkit to an application, and I
i have followed the railscasts episode on nested forms(part 1 and 2) and having
I followed the instructions in Railscasts #197 http://railscasts.com/episodes/197-nested-model-form-part-2 about how to add links that
So I followed the Railscasts tutorials, and everything works up until I click submit
everyone! I was following Railscasts episode #253 , using CarrierWave to do image upload.
I followed the RailsCasts tutorial to do a simple search with autocomplete, but it
I followed the Core Data tutorial at http://macresearch.org/cocoa-scientists-part-xxiii-itunes-ifying-core-data-app The finished application displays data in
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.