Forum: Ruby on Rails IRB fails to call some shell commands only on Windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6826d2eb3e06af4e334b25cfa0879d09?d=identicon&s=25 Umur Ozkul (umuro)
on 2009-05-19 12:32
http://conceptspace.wikidot.com/forum/t-154517/rai...

On windwos, we could not find a way to execute
`gem --version`
on windows.

The weird thing is this is happening while we are able call 'gem
--version' on DOS directly.

Of course there is no problem on Linux.
6883e5ef03484d4fcef507d7b4f1d243?d=identicon&s=25 Matt Jones (Guest)
on 2009-05-19 16:34
(Received via mailing list)
Have you tried invoking gem as `gem.bat --version` in IRB? There's a
special case in the config.gem installation code for win32, so I'd
guess that that might solve your problem...

--Matt Jones

On May 19, 6:32 am, Umur Ozkul <rails-mailing-l...@andreas-s.net>
6826d2eb3e06af4e334b25cfa0879d09?d=identicon&s=25 Umur Ozkul (umuro)
on 2009-05-19 17:53
Matt Jones wrote:
> Have you tried invoking gem as `gem.bat --version` in IRB? There's a
> special case in the config.gem installation code for win32, so I'd
> guess that that might solve your problem...
>
> --Matt Jones
>
> On May 19, 6:32�am, Umur Ozkul <rails-mailing-l...@andreas-s.net>

Yes, I tried.

gem.bat itself is invoking but the calls it makes are resulting all in
errors.
Basically, in IRB, we could not call any "gem installed" commands in
Windows.

e.g. gem, rails, rake

The mystery is as they are available in Shell, why they do result in
error called from IRB?

So far 4 other people complained me of the same thing.

I am inclined to conclude that nobody uses IRB on Windows :)
6883e5ef03484d4fcef507d7b4f1d243?d=identicon&s=25 Matt Jones (Guest)
on 2009-05-21 04:48
(Received via mailing list)
Could you provide more details on how gem "gets an error"? I just
tried it (including installing gems from IRB) and it worked fine. This
isn't the first heisenbug that I've seen with Ruby and Windows... (for
instance, see
http://groups.google.com/group/rubyonrails-talk/br...
)

Thanks,

--Matt Jones

On May 19, 11:53 am, Umur Ozkul <rails-mailing-l...@andreas-s.net>
6826d2eb3e06af4e334b25cfa0879d09?d=identicon&s=25 Umur Ozkul (umuro)
on 2009-05-25 22:22
(Received via mailing list)
I discovered the problem after running a rails template on Windows.
After seeing the problem I opened IRB and failed to call rails, rake
and gem from there. Tried on a few other windows machines to fail the
same way. The error is "Invalid Exacutable Format"

You can try the template:
rails your_app -m http://tinyurl.com/cs-active-scaffold

Which is from the rails tutorial
http://conceptspace.wikidot.com/rails101:introduction

PS. I am an Ubuntu user. I am just trying to know how to keep cross-
platform
6826d2eb3e06af4e334b25cfa0879d09?d=identicon&s=25 Umur Ozkul (umuro)
on 2009-05-25 22:23
(Received via mailing list)
If you successfully run
rails your_app -m http://tinyurl.com/cs-active-scaffold
on your windows then I would say that everybody I've met has a wrong
installation!
6883e5ef03484d4fcef507d7b4f1d243?d=identicon&s=25 Matt Jones (Guest)
on 2009-05-26 17:19
(Received via mailing list)
Now I understand. Yep, that's a known issue with templates:
https://rails.lighthouseapp.com/projects/8994-ruby...

--Matt Jones
6826d2eb3e06af4e334b25cfa0879d09?d=identicon&s=25 Umur Ozkul (umuro)
on 2009-05-26 21:53
Matt Jones wrote:
> Now I understand. Yep, that's a known issue with templates:
> https://rails.lighthouseapp.com/projects/8994-ruby...
>
> --Matt Jones

Relief to know that.

I added warnings to http://conceptspace.wikidot.com/ and debugged the
template to be free of commands almost. Finally I could achieve a
running Windows version I guess.
This topic is locked and can not be replied to.