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 8978747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:41:11+00:00 2026-06-15T19:41:11+00:00

In some ways, it’s the getting started with chef problem. But, I’m trying to

  • 0

In some ways, it’s the getting started with chef problem. But, I’m trying to create a simple recipe to checkout from github my jekyll code then run jekyll to build it locally. I’ve not started worrying about getting the nginx configuration running, but I’ve tried just about 100 different permutations of the ‘before_migrate’ script and have yet to find a way to load jekyll into either a gem that’s available or into the path to do an command "jekyll ..."

Here is the current recipe as it stands:

include_recipe "git"

application "corpsite" do
  path "/opt/tubularlabs/corpsite"
  repository "git@github.com:Tubular/corpsite.git"
  revision "master"

  deploy_key <<EOF
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
EOF

  before_migrate do
    execute 'Deploy Jekyll blog' do
      chef_gem "jekyll" do
        action :install
      end

      require "jekyll"

      command "jekyll"
      action :run
    end
  end
end

UPDATE:

The problem turned out not to be a recipe issue at all, but rather that one of the HTML docs contained a UTF-8 charactered and jekyll was running with LC_ALL=C thus barfing. It didn’t help that this was of course the first recipe I ever tried to write.

For historical sake, heres’ the final script

before_migrate do
  chef_gem "jekyll"

  execute 'Deploy Jekyll blog' do
    cwd  release_path
    environment ({"LC_ALL" => "en_US.UTF-8"})
    command "jekyll"
  end
end
  • 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-06-15T19:41:12+00:00Added an answer on June 15, 2026 at 7:41 pm

    I’ve installed gems and required them before like this

    gem_package "nokogiri" do
      action :nothing
    end.run_action(:install)
    
    gem 'nokogiri'
    require 'nokogiri'
    

    Hopefully that works out for you (tried it with jekyll and works)

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

Sidebar

Related Questions

i have found some ways but they are actually reading frames and applying transition
I searched my problem in StackOverflow, and I understood some of the ways to
I had used several ways to do some simple integer arithmetic in BASH (3.2).
I've thought of some less than elegant ways to solve this, but I know
I tried some ways, but they either threw a SmartyException or the nested templates
Are there some ways to interact with services as simple as content providers'? I
My development machine is different from my deployment/production servers in some ways that cannot
What are some ways (if any) to link or import a style sheet from
I can't use any external libraries, so I'm trying to think of some ways
There are some ways to run automatically program on startup under Linux But My

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.