Kaushal Modi
Kaushal Modi

Reputation: 1370

"spawn.h not found" while installing octopress on Cygwin

I have been trying to install octopress on cygwin. I have googled but no avail. I hope that someone can suggest a hack (no matter how complicated) to resolve this.

I followed the octopress installation instructions. Everything went smoothly till the bundle install stage. When I reached that point, the installation quits with the error telling that it couldn't find spawn.h.

I searched and apparently spawn.h doesn't come in any of the cygwin libraries. I installed all the c++ libraries I could from cygwin setup but that did not help.

Can you please help resolve this?

Upvotes: 4

Views: 1077

Answers (1)

alebelcor
alebelcor

Reputation: 363

I think the gem that fails in this process is posix-spawn. For this, you could install the gem locally:

$ gem install rake-compiler -v 0.7.6
$ git clone git://github.com/rtomayko/posix-spawn.git
$ cd posix-spawn
$ rake gem
$ cd pkg/posix-spawn-0.3.6
$ gem install --local posix-spawn-0.3.6.gem

The explanation (from an article I found):

There is a bug in the version of posix-spawn in the gem repositories however that makes installing via gem impossible on Cygwin

After this, try bundle install again, it should be successful.

Here's a related issue on the GitHub project


UPDATE: I recently installed scoop a command-line installer for Windows, a pretty easy setup. I installed Ruby, bundler and octopress without breaking a sweat. You should give it a try.

Upvotes: 6

Related Questions