Help with Ruby under cygwin

Chris Lowis wrote:

Is it not possible to do
   gem install rake
now that you have rubygems installed ?

Chris

It is, but it doesn't install the "rake" command to the /usr/bin area,
installing from the package distro using it's supplied setup.rb does. I
of course, only found this out after trying both :slight_smile:

I want it under cygwin because some of our existing scripts etc are on
cygwin and run on both 'nix boxen and PCs.

BTW is there a WIKI for maintaining Ruby/Rake HOWTO docs?

I would have loved to find a succinct, complete, and accurate "HOWTO
install ruby with rake on windows cygwin". I like many, when starting
out, start knowing absolutely nothing about ruby and rake, and the first
thing one does when starting anything is "install it". So to promote
ruby/rake and prevent the "oh my god this is YO chaotic mess"
perception, the initial installation process has to be "reliable" or
"one-click" or in a single set of easy non-ambiguous instructions with
no "implicit" community or language specific knowledge assumed. It is
the gateway to perceiving an propagating system.

BTW - so far ruby/rake seems to be what I want a *real* interpreter
based "make" to do for creating build automation (and other things).
Now I have to convince management that it isn't a chaotic hard to
maintain non-standard mess, and need to build a one-click installer to
put on our internal web site for the base system, and justify the
learning curve.

I want this to be a highly effective "ant poison" - I'm getting eaten
alive! :slight_smile:

gnu-make is now completely obsolete even though capable, cross platform
and "ubiquitous". if for no other reason than it doesn't handle paths
with spaces in them. But it also lacks programmability and modular
maintainability for large build systems.

PK

···

--
Posted via http://www.ruby-forum.com/\.

It is, but it doesn't install the "rake" command to the /usr/bin area,
installing from the package distro using it's supplied setup.rb does. I
of course, only found this out after trying both :slight_smile:

That's strange. I also use cygwin ruby. I have:

$ gem list | grep 'rake'
rake (0.8.1)

installed through ruby gems, and "which rake" shows the rake
executable at /usr/bin/rake .

I also don't recall having to set any environment variables to get
ruby to work. I have no $RUBYOPT set, for example. I downloaded
cygwin, and installed ruby using the cygwin package manager. Then I
downloaded rubygems 1.2.0, installed using setup.rb and everything
"just worked" after that. Perhaps this is why there is no detailed
HOWTO - the steps required in my case were quite minimal.

Apart from the occasional problem installing native binary based gems
I have found the ruby cygwin experience painless, and have never felt
the need to use the "one-click" installer. I can understand some
peoples aversion to cygwin though.

Is it possible that your system is using some non-standard defaults or
installation paths that are causing problems ? At some point perhaps I
can get a clean windows installation and try this again.

Chris

all I can do is report my experience.

If you wish to start with a virgin cygwin install, then write down
everything you did step by step, in detail, so I can repeat it here
exactly as you did it and test it, I can give you feedback.

I failed initially following the on-line instructions I found.
What I did:

I installed cygwin with with ruby with the latest version on c:\cygwin
I did do so after installing the ruby "OnClickInstall" and later
removing all the path and enviroment variables it created.

On cygwin I installed rubygems from rubygems-0.8.11.zip using the
./setup.rb
Then I first tried "gem remote --install rake" and didn't get
the /usr/bin/rake command installed though it "succeeded" and updated
the contents of /usr/lib/ruby/1.8/rake.

now it is possible cygwin didn't properly
update it's "what's in the path cache"

note: googling I see a more explicit gem command as
    "gem install rake --source=http://gems.rubyforge.net"
I did not try that.

when I installed it from the package using ./setup.exe it apparently did
install the /usr/bin/rake, or in some way at that time cygwin now knew
where to find it.

I then tried to run the rake test suite, it barfed apparently needing
some "gem" libraries that are apparently not installed as part of the
rake initial setup on cygwin. and then I did:

$ gem install rcov (does this download or get out of the local cache?)
$ gem install flexmock (ditto)

assuming that might do the trick seeing that syntax elsewhere.

and then the rake test ran, though with some reported non-fatal errors.

(The I gave up on trying to make the test perfect, because it appeared
to be from some missing "session thing" which someone hinted was not
available on windows, and ordered the latest "pickaxe" book :slight_smile:

PK

Chris Lowis wrote:

···

It is, but it doesn't install the "rake" command to the /usr/bin area,
installing from the package distro using it's supplied setup.rb does. I
of course, only found this out after trying both :slight_smile:

That's strange. I also use cygwin ruby. I have:

$ gem list | grep 'rake'
rake (0.8.1)

installed through ruby gems, and "which rake" shows the rake
executable at /usr/bin/rake .

I also don't recall having to set any environment variables to get
ruby to work. I have no $RUBYOPT set, for example. I downloaded
cygwin, and installed ruby using the cygwin package manager. Then I
downloaded rubygems 1.2.0, installed using setup.rb and everything
"just worked" after that. Perhaps this is why there is no detailed
HOWTO - the steps required in my case were quite minimal.

Apart from the occasional problem installing native binary based gems
I have found the ruby cygwin experience painless, and have never felt
the need to use the "one-click" installer. I can understand some
peoples aversion to cygwin though.

Is it possible that your system is using some non-standard defaults or
installation paths that are causing problems ? At some point perhaps I
can get a clean windows installation and try this again.

Chris

--
Posted via http://www.ruby-forum.com/\.