I’ve been trying to get jekyll installed within the Cygwin 1.7.9-1
environment using Ruby 1.9.3-p0 on WinXP. Ruby and RubyGems are working
fine. However, I continually run into an issue with posix-spawn being
unable to compile when trying to install Jekyll.
The posix-spawn developers created a patch to keep posix-spawn from
compiling, as it’s unnecessary. However, there are a couple of issues
I’m having:
I can’t get this gem (posix-spawn-0.3.6.gem) with the patch
applied. Installing with ‘gem install posix-spawn’ after removing from
cache and gems doesn’t pull the fresh code; and
The patch assumes RUBY_PLATFORM ~= “cygwin” (among others).
However, ruby 1.9.3-p0 sets RUBY_PLATFORM to “i386-cygwin” so the
comparison won’t work.
I’m new to Ruby, and am admittedly only using it for Jekyll (at the
moment). I realize that some of the issue likely resides within Cygwin,
but seems I should be able to address each issue within Ruby itself. Can
I just set RUBY_PLATFORM in the Makefile and rebuild? How can I get the
updated posix-spawn code? Hand-editing the two changed .rb files in
posix-spawn to add the comparison doesn’t help, as each time I run “gem
install *” posix-spawn is installed over any changes I’ve made.
Thank you for your patience and any help you can provide.
I’ve been trying to get jekyll installed within the Cygwin 1.7.9-1
environment using Ruby 1.9.3-p0 on WinXP. Ruby and RubyGems are working
fine. However, I continually run into an issue with posix-spawn being
unable to compile when trying to install Jekyll.
The posix-spawn developers created a patch to keep posix-spawn from
compiling, as it’s unnecessary. However, there are a couple of issues
I’m having:
I can’t get this gem (posix-spawn-0.3.6.gem) with the patch
applied. Installing with ‘gem install posix-spawn’ after removing from
cache and gems doesn’t pull the fresh code; and
I’m new to Ruby, and am admittedly only using it for Jekyll (at the
moment). I realize that some of the issue likely resides within Cygwin,
but seems I should be able to address each issue within Ruby itself. Can
I just set RUBY_PLATFORM in the Makefile and rebuild? How can I get the
updated posix-spawn code? Hand-editing the two changed .rb files in
posix-spawn to add the comparison doesn’t help, as each time I run “gem
install *” posix-spawn is installed over any changes I’ve made.
You can build the gem your self
1.1) Clone posix-spawn repository,
1.2) introduce the modifications
1.3) generate the gem with “rake gem”
Exceedingly helpful. I didn’t recognize the platform condition as a
regular expression. In irb, “print RUBY_PLATFORM” results in
“1386-cygwin.” This is also specified in
/local/include/ruby-1.9.1/i386-cygwin/ruby/config.h.
I first tried to install the posix-spawn gem from rubygems.org, and hit
the same error. I unpacked it only to find that it doesn’t include the
commit which adds “cygwin” to the condition regex. I further cloned the
repo and attempted to build the gem myself, but hit upon an issue that
aborts the rake.
Rake can’t find rake/extensiontask. I’ve reinstalled the rake gem just
to be sure nothing was clobbered or installed incorrectly to begin with,
to no avail.
It shouldn’t be necessary, but I’m going to reinstall Ruby 1.9.3. It may
be that the fact I installed Ruby 1.8 via the Cygwin installer and then
later compiled and installed 1.9.3 has created a conflict. That feels of
a piece with “Just reinstall Windows” in its ignorant paranoia, but I
tried. This also did not mitigate the issue.
I’ll keep pecking away at the issue. How frequently is the rubygems.org
repository updated?
The issue was that I didn’t have rake-compiler installed. I have now
built the posix-spawn gem, installed it, and installed jekyll (the
original impetus). All seems well for the moment.
Thank you again, Luis.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.