Ruby-2.0.0-rc2 on Windows under Cygwin. Cannot run IRB, gem, rake, etc

Hello.

I’ve successfully (I think so) installed Ruby-2.0.0-rc2 on Windows XP
under Cygwin (1.7.17(0.262/5/3)) using Ruby-builder. It lives now here:

C:\cygwin\usr\local\ruby-2.0.0-rc2 - win path or
/usr/local/ruby-2.0.0-rc2 - cygwin path

It seems it works fine since I can run “ruby -v” and other commands from
the shell like this, for example:

$ ./ruby -e ‘(1…2).each { |i| puts “This is #{i}” }’
This is 1
This is 2

Please see a pic in the attachment, it is a screenshot of its /bin
directory. The problem is that only ruby.exe works fine. As I said above
I can check it this way and get positive result:

$ ./ruby -e “puts ‘Hello World’”
Hello World

But the rest of the files (those unix-like without extensions) just
throw errors:

$ ./gem --help
-bash: ./gem: /usr/local/2.0.0-rc2/bin/ruby: bad interpreter: Permission
denied

$ ./rake --help
-bash: ./rake: /usr/local/2.0.0-rc2/bin/ruby: bad interpreter:
Permission denied

How may I run these Ruby files?

I’m very new to Unix/Linux and yet don’t know through and through how it
works. So is the reason I just didn’t set some options|env_vars with
Bash or Cygwin Shell or smth else Unix-specific, or those Ruby commands
will never work under “Windows/Cygwin” environment?

So I figured out the problem. I was just my inadvertence.

I’ve mistakenly installed Ruby under /usr/local/2.0.0-rc2. I forgot to
put “ruby-” before figures. Then when it was installed I thought that it
was not nice and changed the name of the folder to
/usr/local/ruby-2.0.0-rc2.

But it put shebang strings everywhere like /usr/local/2.0.0-rc2,
without “ruby-”. I was impossible to for it to find the resource. So I
just took away that “ruby-” and it began to work just fine.

But anyway I couldn’t install any gems with it. No zlib it says. But I
have installed ALL possible zlibs from cygwin’s setup.exe. But anyway it
complains that I have no zlib.

So the lesson I took from it: I must forget about that
Cygwin, throw it away from the comp, and use complete real Unix/Linux.
No any substitutes. They are just waste of time. Unpleasant experience.

On Mon, 18 Mar 2013 11:05:19 +0100, Wins L. [email protected]
wrote:

So the lesson I took from it: I must forget about that
Cygwin, throw it away from the comp, and use complete real Unix/Linux.
No any substitutes. They are just waste of time. Unpleasant experience.

I use MinGW and it’s pretty usable. (Never tried to compile Ruby on it,
but I managed to compile ImageMagick when I needed it, so I suppose it
would work.)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs