[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Shared cygwin & command.com environments?

Jay Levitt

5/3/2006 7:40:00 PM

I've been using the Cygwin bash shell to do most of my command-line ruby
work, since it's a much nicer environment than command.com. However, since
my apps themselves are kicked off by Eclipse, using the standard
interpreter, I end up having to maintain two ruby builds, two sets of gems,
etc.

Worse, now that I upgraded to rake 0.7.1 with rails 1.1, it's somehow
looking in the wrong place for everything; in fact, bash seems totally
confused as to which ruby it's really running:

$ which ruby
c:\dev\ruby\bin\ruby.exe
[So it says I'm running the non-cygwin version]

$ ruby --version
ruby 1.8.4 (2005-12-24) [i386-cygwin]
[But actually seems to run the cygwin version!]

$ c:/dev/ruby/bin/ruby --version
ruby 1.8.2 (2004-12-25) [i386-mswin32]


$ /usr/local/bin/ruby --version
ruby 1.8.4 (2005-12-24) [i386-cygwin]

My $PATH puts /usr/local/bin first, and /cygdrive/c/dev/ruby/bin way down
near the bottom.

So... I'm thinking of blowing the whole mess away. Is there any way to get
cygwin bash to run the mswin ruby.exe successfully? Or at least get them
to share gem libraries? I remember that this used to crash.

And anyone have any idea why it's launching the right ruby when I type
"ruby", but giving the wrong one to "which" (and, I presume, launching rake
with the wrong one)?

Jay Levitt
16 Answers

Robert Klemme

5/4/2006 7:25:00 AM

0

Jay Levitt wrote:
> I've been using the Cygwin bash shell to do most of my command-line ruby
> work, since it's a much nicer environment than command.com. However, since
> my apps themselves are kicked off by Eclipse, using the standard
> interpreter, I end up having to maintain two ruby builds, two sets of gems,
> etc.
>
> Worse, now that I upgraded to rake 0.7.1 with rails 1.1, it's somehow
> looking in the wrong place for everything; in fact, bash seems totally
> confused as to which ruby it's really running:
>
> $ which ruby
> c:\dev\ruby\bin\ruby.exe
> [So it says I'm running the non-cygwin version]
>
> $ ruby --version
> ruby 1.8.4 (2005-12-24) [i386-cygwin]
> [But actually seems to run the cygwin version!]
>
> $ c:/dev/ruby/bin/ruby --version
> ruby 1.8.2 (2004-12-25) [i386-mswin32]
>
>
> $ /usr/local/bin/ruby --version
> ruby 1.8.4 (2005-12-24) [i386-cygwin]
>
> My $PATH puts /usr/local/bin first, and /cygdrive/c/dev/ruby/bin way down
> near the bottom.
>
> So... I'm thinking of blowing the whole mess away. Is there any way to get
> cygwin bash to run the mswin ruby.exe successfully? Or at least get them
> to share gem libraries? I remember that this used to crash.

I'd rather do it the other way round: make cmd.exe call a batch script
that actually invokes bash and then cygwin's ruby. Feels more
comfortable to me.

> And anyone have any idea why it's launching the right ruby when I type
> "ruby", but giving the wrong one to "which" (and, I presume, launching rake
> with the wrong one)?

Might have to do with the fact that "which" is not a shell builtin:
better use "type" for that on a bash:

09:23:11 [~]: type -a which
which is /usr/bin/which
which is /bin/which
09:23:11 [~]: type -a type
type is a shell builtin

Kind regards

robert

Jay Levitt

5/9/2006 10:58:00 AM

0

On Thu, 04 May 2006 09:25:09 +0200, Robert Klemme wrote:

>> So... I'm thinking of blowing the whole mess away. Is there any way to get
>> cygwin bash to run the mswin ruby.exe successfully? Or at least get them
>> to share gem libraries? I remember that this used to crash.
>
> I'd rather do it the other way round: make cmd.exe call a batch script
> that actually invokes bash and then cygwin's ruby. Feels more
> comfortable to me.

Interesting.. any reason why? When I'm not at a command prompt, I'm using
Eclipse to launch ruby, webrick, etc. I suppose I could set it to use the
cygwin interpreter, but I'm not clear if that's going to cause other
problems - e.g. if there are other things that Eclipse/RDT does outside the
cygwin environment that'd confuse it, or if it passes pathnames properly.
So I thought it'd be better if my primary Ruby environment was in win32.

>> And anyone have any idea why it's launching the right ruby when I type
>> "ruby", but giving the wrong one to "which" (and, I presume, launching rake
>> with the wrong one)?
>
> Might have to do with the fact that "which" is not a shell builtin:
> better use "type" for that on a bash:

Doh! Yes, that was the problem. Especially because the previous version
of Cygwin's /etc/profile added paths in a suboptimal order, and because
five or six years ago I stuck a DOS version of which.exe in my path.

So I tried running the win32 ruby from cygwin, but it was unhappy - I
forget what errors I ran into. I installed cygwin's version again, and it
almost works, but then I run into the classic shebang problem: all of
ruby's scripts start with (in my case)

#!c:/dev/ruby/bin/ruby

which of course is the wrong ruby to be loading. I can kludge that
particular case by creating a symlink from /usr/local/bin/rake to
c:/dev/ruby/bin/rake.cmd, but that's not a general solution...

Is there any way to override the shebang path with my own ruby, while still
getting one-word access to scripts (e.g. not "ruby rake")? On Linux the
answer is to have scripts use /usr/bin/env instead of a hardcoded path, but
of course that wouldn't exist on Windows either...

Jay

Robert Klemme

5/9/2006 12:10:00 PM

0

Jay Levitt wrote:
> On Thu, 04 May 2006 09:25:09 +0200, Robert Klemme wrote:
>
>>> So... I'm thinking of blowing the whole mess away. Is there any way to get
>>> cygwin bash to run the mswin ruby.exe successfully? Or at least get them
>>> to share gem libraries? I remember that this used to crash.
>> I'd rather do it the other way round: make cmd.exe call a batch script
>> that actually invokes bash and then cygwin's ruby. Feels more
>> comfortable to me.
>
> Interesting.. any reason why? When I'm not at a command prompt, I'm using
> Eclipse to launch ruby, webrick, etc. I suppose I could set it to use the
> cygwin interpreter, but I'm not clear if that's going to cause other
> problems - e.g. if there are other things that Eclipse/RDT does outside the
> cygwin environment that'd confuse it, or if it passes pathnames properly.
> So I thought it'd be better if my primary Ruby environment was in win32.
>
>>> And anyone have any idea why it's launching the right ruby when I type
>>> "ruby", but giving the wrong one to "which" (and, I presume, launching rake
>>> with the wrong one)?
>> Might have to do with the fact that "which" is not a shell builtin:
>> better use "type" for that on a bash:
>
> Doh! Yes, that was the problem. Especially because the previous version
> of Cygwin's /etc/profile added paths in a suboptimal order, and because
> five or six years ago I stuck a DOS version of which.exe in my path.
>
> So I tried running the win32 ruby from cygwin, but it was unhappy - I
> forget what errors I ran into. I installed cygwin's version again, and it
> almost works, but then I run into the classic shebang problem: all of
> ruby's scripts start with (in my case)
>
> #!c:/dev/ruby/bin/ruby
>
> which of course is the wrong ruby to be loading. I can kludge that
> particular case by creating a symlink from /usr/local/bin/rake to
> c:/dev/ruby/bin/rake.cmd, but that's not a general solution...
>
> Is there any way to override the shebang path with my own ruby, while still
> getting one-word access to scripts (e.g. not "ruby rake")? On Linux the
> answer is to have scripts use /usr/bin/env instead of a hardcoded path, but
> of course that wouldn't exist on Windows either...

.... but in cygwin. You can set it up this way: have a #! appropriate
for cygwin's use and associate *.rb with the Windows Ruby in Windows. I
use the cygwin only, but then again - I rarely start ruby scripts via
windows programs.

HTH

robert

Andy W

11/14/2009 11:17:00 PM

0

On 14 Nov, 11:49, Frankie Lee <leeahk...@yahoo.com> wrote:
> Have you seen demons?
> Have you seen Angels?
>
> Have you watch many lives transform,and from being a great sinner to
> become a saint?
> Do have assurance and confidence of what lies beyond the grave?
>
> Have you been to the dimension world,of spirits and of Angels?
> Have you seen demons run at your command?
>
> Have you laid hands on the needy folks,and slowly see them well,not by
> medicine alone,but by God's power?
>
> Have you heard Audible voice of God,and do you know how does God's
> Voice sound?
> Have you been led by a still small voice?
>
> Have you battled with sins,death and demons and won?
> Have you watch debates,read,and discern lies and truths among their
> conversation?
>
> Have you studied all the objection of men towards God,and saw their
> follies of reasons,and their blindness?
> Have studied through the Bible?
>
> Do you speak in tongues,and had the Interpretation out of it?
> Have you had your future prophesied and it came to pass?

Nope. And neither have you. And if you think you have, you're actually
insane.

Andy

SkyEyes

11/15/2009 3:22:00 AM

0

On Nov 14, 4:49 am, Frankie Lee <leeahk...@yahoo.com> wrote:

Hey, Frankie, my boyfriend's amputated legs still haven't started to
grow back. When can we expect some results on that little experiement
of yours, anyway? Come on, now: if his legs grow back, not only will
I become a believer, but he will, too. How long is your god going to
make us wait, anyway?

Brenda Nelson, A.A.#34
BAAWA Knight
EAC Professor of Feline Thermometrics and Cat-Herding
skyeyes nine at cox dot net

Frankie Lee

11/15/2009 4:27:00 AM

0

On Nov 15, 11:21 am, SkyEyes <skyey...@cox.net> wrote:
> On Nov 14, 4:49 am, Frankie Lee <leeahk...@yahoo.com> wrote:
>
> Hey, Frankie, my boyfriend's amputated legs still haven't started to
> grow back.  When can we expect some results on that little experiement
> of yours, anyway?  Come on, now:  if his legs grow back, not only will
> I become a believer, but he will, too.  How long is your god going to
> make us wait, anyway?
>
> Brenda Nelson, A.A.#34
> BAAWA Knight
> EAC Professor of Feline Thermometrics and Cat-Herding
> skyeyes nine at cox dot net

**Why do you think yourself as some puppet,and some robots?Just
because you can choose,others cannot choose meh?
Tell me,why should I choose to help you,when on the outset you tell me
you do not want my help?

There is a free choice.

There is a guy who went to see a Pastor,and wanted to be heal of a
dreaded disease.That pastor refused to pray for him,and he went
home,later on died.

Many are called,few are chosen.







Frankie Lee

11/15/2009 4:29:00 AM

0

On Nov 14, 8:51 pm, Mitchell Holman <noem...@comcast.net> wrote:
> Frankie Lee <leeahk...@yahoo.com> wrote innews:e7fbdf3b-4e78-42a3-a34b-22be6e4c34a4@m7g2000prd.googlegroups.com:
>
>
>
> > Have you laid hands on the needy folks,and slowly see them well,not by
> > medicine alone,but by God's power?
>
>      If God wanted these people to be healed why did
> he make them sick to begin with?

***If God wanted these people to be well,then it logically conclude He
didn't make them sick.Where is your logic and common sense?






Cory Albrecht

11/16/2009 12:27:00 AM

0

Frankie Lee wrote, on 09-11-14 11:26 PM:
> On Nov 15, 11:21 am, SkyEyes<skyey...@cox.net> wrote:
>> On Nov 14, 4:49 am, Frankie Lee<leeahk...@yahoo.com> wrote:
>>
>> Hey, Frankie, my boyfriend's amputated legs still haven't started to
>> grow back. When can we expect some results on that little experiement
>> of yours, anyway? Come on, now: if his legs grow back, not only will
>> I become a believer, but he will, too. How long is your god going to
>> make us wait, anyway?
>>
>> Brenda Nelson, A.A.#34
>> BAAWA Knight
>> EAC Professor of Feline Thermometrics and Cat-Herding
>> skyeyes nine at cox dot net
>
> **Why do you think yourself as some puppet,and some robots?Just
> because you can choose,others cannot choose meh?
> Tell me,why should I choose to help you,when on the outset you tell me
> you do not want my help?
>
> There is a free choice.
>
> There is a guy who went to see a Pastor,and wanted to be heal of a
> dreaded disease.That pastor refused to pray for him,and he went
> home,later on died.
>
> Many are called,few are chosen.

So, basically, you are contradicting yourself about how your little
pseudo-experiment would work, eh?

First you said that all people would have to do is pray for a week and
they would get evidence of God.

Now here you are all but saying that your little "experiment" won't even
work in a repeatable and verifiable manner.

Any particular reason why you've decided to backtrack on your claims,
Frankie?

You know, I think that I am going to try your "experiment" - for 1 week
I am going to pray to God that you realize your ignorance and repent of
of your dishonesty.

Let's reconvene in 7 days.

SkyEyes

11/16/2009 12:59:00 AM

0

On Nov 14, 9:26 pm, Frankie Lee <leeahk...@yahoo.com> wrote:
> On Nov 15, 11:21 am, SkyEyes <skyey...@cox.net> wrote:
>
> > On Nov 14, 4:49 am, Frankie Lee <leeahk...@yahoo.com> wrote:
>
> > Hey, Frankie, my boyfriend's amputated legs still haven't started to
> > grow back.  When can we expect some results on that little experiement
> > of yours, anyway?  Come on, now:  if his legs grow back, not only will
> > I become a believer, but he will, too.  How long is your god going to
> > make us wait, anyway?
>
> > Brenda Nelson, A.A.#34
> > BAAWA Knight
> > EAC Professor of Feline Thermometrics and Cat-Herding
> > skyeyes nine at cox dot net
>
> **Why do you think yourself as some puppet,and some robots?Just
> because you can choose,others cannot choose meh?
> Tell me,why should I choose to help you,when on the outset you tell me
> you do not want my help?

It's very simple, Frankie: You asked me in one threat what would be
evidence, for me, that a god exists.

In a different thread, you claimed that your god has healed amputees
through the agency of prayer.

And then I said, "If my boyfriend's missing legs grow back, that would
be, for me, sufficient proof of God's existence."

Don't tell me you're going to waffle about this, now!
>
> There is a free choice.

This isn't a free will argument, This is the miraculous healing of an
amputee by your god, which you say can be effected by prayer.
>
> There is a guy who went to see a Pastor,and wanted to be heal of a
> dreaded disease.That pastor refused to pray for him,and he went
> home,later on died.

The man undoubtedly would have died anyway. However, *if* the pastor
was able to heal him by prayer, and refused to do so, then the pastor
is guilty of murder.

> Many are called,few are chosen.

Which means what, exactly, in this context?

You know what I think, Frankie? I think you *know* that you can't
heal an amputee, or bring a dead person back to life. And now that
you've been called upon to demonstrate your claims, you're looking for
a way to weasle out of them.

Brenda Nelson, A.A.#34
BAAWA Knight
EAC Professor of Feline Thermometrics and Cat-Herding
skyeyes nine at cox dot net

hoser1605

11/18/2009 8:15:00 PM

0

On Nov 15, 7:58 pm, SkyEyes <skyey...@cox.net> wrote:
> On Nov 14, 9:26 pm, Frankie Lee <leeahk...@yahoo.com> wrote:
>
>
>
> > On Nov 15, 11:21 am, SkyEyes <skyey...@cox.net> wrote:
>
> > > On Nov 14, 4:49 am, Frankie Lee <leeahk...@yahoo.com> wrote:
>
> > > Hey, Frankie, my boyfriend's amputated legs still haven't started to
> > > grow back.  When can we expect some results on that little experiement
> > > of yours, anyway?  Come on, now:  if his legs grow back, not only will
> > > I become a believer, but he will, too.  How long is your god going to
> > > make us wait, anyway?
>
> > > Brenda Nelson, A.A.#34
> > > BAAWA Knight
> > > EAC Professor of Feline Thermometrics and Cat-Herding
> > > skyeyes nine at cox dot net
>
> > **Why do you think yourself as some puppet,and some robots?Just
> > because you can choose,others cannot choose meh?
> > Tell me,why should I choose to help you,when on the outset you tell me
> > you do not want my help?
>
> It's very simple, Frankie:  You asked me in one threat what would be
> evidence, for me, that a god exists.
>
> In a different thread, you claimed that your god has healed amputees
> through the agency of prayer.
>
> And then I said, "If my boyfriend's missing legs grow back, that would
> be, for me,  sufficient proof of God's existence."
>
> Don't tell me you're going to waffle about this, now!
>
>
>
> > There is a free choice.
>
> This isn't a free will argument,  This is the miraculous healing of an
> amputee by your god, which you say can be effected by prayer.
>
>
>
> > There is a guy who went to see a Pastor,and wanted to be heal of a
> > dreaded disease.That pastor refused to pray for him,and he went
> > home,later on died.
>
> The man undoubtedly would have died anyway.  However, *if* the pastor
> was able to heal him by prayer, and refused to do so, then the pastor
> is guilty of murder.
>
> > Many are called,few are chosen.
>
> Which means what, exactly, in this context?
>
> You know what I think, Frankie?  I think you *know* that you can't
> heal an amputee, or bring a dead person back to life.  And now that
> you've been called upon to demonstrate your claims, you're looking for
> a way to weasle out of them.
>
> Brenda Nelson, A.A.#34
> BAAWA Knight
> EAC Professor of Feline Thermometrics and Cat-Herding
> skyeyes nine at cox dot net

More Frankie Lee. And I thought he'd gone away. Silly me.