Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Whats going on!?!?

Reply
Thread Tools

Whats going on!?!?

 
 
Erik Boling
Guest
Posts: n/a
 
      10-02-2007
Ok so I was programming perfectly fine earlier yesterday, then i got
this idea about instead of going through cmd to open my program, why not
just chose cmd as the program to open it?... bad idea i got this weird
access denied error. Then it would do that to every program i tried to
run, even new ones i made. Then i accidentally set scite as the default
to open the files, so when i ran them in cmd it would just open scite
and show me the code. so i re-installed ruby, and the access denied erro
still pops up when i try and run any ruby program? Any one know what i
need to do to fix this?

Many thanks,
Erik
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Phlip
Guest
Posts: n/a
 
      10-02-2007
Erik Boling wrote:

> it would just open scite
> and show me the code. so i re-installed ruby, and the access denied erro
> still pops up when i try and run any ruby program? Any one know what i
> need to do to fix this?


Get CygWin (but not its Ruby), and learn to use BASH, a real command
line interface. After a little easy tuning it's easier than mouse
abuse.

Then get with a Windows tutorial (under the wild assumption you use
Windows), and then learn to de-gunk your system registry. It has a
link to the wrong ruby, possibly rubyw.exe. Uninstalling Ruby won't
remove the link because it's outside Ruby's home folder in the
registry. Back your 'puter up before twiddling with the registry!

Then erase your Windows and get Linux. It supports symlinks, which
make most of that ridiculous registry unneeded.

--
Phlip
http://www.oreilly.com/catalog/9780596510657/
^ assert_xpath

 
Reply With Quote
 
 
 
 
Gordon Thiesfeld
Guest
Posts: n/a
 
      10-02-2007
On 10/2/07, Erik Boling <(E-Mail Removed)> wrote:
> Ok so I was programming perfectly fine earlier yesterday, then i got
> this idea about instead of going through cmd to open my program, why not
> just chose cmd as the program to open it?... bad idea i got this weird
> access denied error. Then it would do that to every program i tried to
> run, even new ones i made. Then i accidentally set scite as the default
> to open the files, so when i ran them in cmd it would just open scite
> and show me the code. so i re-installed ruby, and the access denied erro
> still pops up when i try and run any ruby program? Any one know what i
> need to do to fix this?


While it may be possible to set Windows up to do this, I think it
would cause other problems; for instance, opening a new cmd prompt
each time you type it on the command line. I changed the open action
on .rb files to run cmd.exe, and then I changed it back like this:

C:\>assoc .rb
rb=rbFile

C:\>ftype rbFile
rbFile=cmd.exe "%1" %*

C:\>ftype rbFile="C:\ruby\ruby186\bin\ruby.exe" "%1" %*
rbFile="C:\ruby\ruby186\bin\ruby.exe" "%1" %*

The path to your ruby executable is probably different than mine. Let
me know if that works.

Regards,

Gordon

 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      10-02-2007
Arlen Christian Mart Cuss wrote:

> > get Linux. It supports symlinks, which
> > make most of that ridiculous registry unneeded.


> Just quietly, I don't think it's symlinks which mean we don't need a
> registry ...


No, we just need a rambling /etc folder full of spaghetti
configurations, each one written in its own Custom Configuration
Language /Du-Jour/!

> To the OP: look up on "file associations" in Windows. Gordon's reply is
> good.


Jah - I only knew how to hack the registry. (-;

--
Phlip

 
Reply With Quote
 
Erik Boling
Guest
Posts: n/a
 
      10-03-2007

C:\>assoc .rb
rb=rbFile

C:\>ftype rbFile
rbFile=cmd.exe "%1" %*

C:\>ftype rbFile="C:\ruby\ruby186\bin\ruby.exe" "%1" %*
rbFile="C:\ruby\ruby186\bin\ruby.exe" "%1" %*

Ok i have really no clue on what you are saying there, are all those
just file locations, do i need to make the?, do i have to create a file
association * which i'm not sure how to do*? thank you for all the
replies but i'm a bit confused right now :\.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      10-03-2007
Erik Boling wrote:

> C:\>assoc .rb
> .rb=rbFile
>
> C:\>ftype rbFile
> rbFile=cmd.exe "%1" %*
>
> C:\>ftype rbFile="C:\ruby\ruby186\bin\ruby.exe" "%1" %*
> rbFile="C:\ruby\ruby186\bin\ruby.exe" "%1" %*
>
> Ok i have really no clue on what you are saying there, are all those
> just file locations, do i need to make the?, do i have to create a file
> association * which i'm not sure how to do*? thank you for all the
> replies but i'm a bit confused right now :\.


Click on Start, click on Run, type CMD, press Enter, and enter these
commands:

assoc /?
ftype /?

--
Phlip


 
Reply With Quote
 
Erik Boling
Guest
Posts: n/a
 
      10-03-2007

> Click on Start, click on Run, type CMD, press Enter, and enter these
> commands:
>
> assoc /?
> ftype /?

Ok here you go, this is what i get, maybe you guys know what i need to
do.. oh yea dont get fooled by my default location, i changed it to that
file a while ago and things have been working fine.


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\TestProgramsT>assoc /?
Displays or modifies file extension associations

ASSOC [.ext[=[fileType]]]

.ext Specifies the file extension to associate the file type with
fileType Specifies the file type to associate with the file extension

Type ASSOC without parameters to display the current file associations.
If ASSOC is invoked with just a file extension, it displays the current
file association for that file extension. Specify nothing for the file
type and the command will delete the association for the file extension.

C:\TestProgramsT>ftype /?
Displays or modifies file types used in file extension associations

FTYPE [fileType[=[openCommandString]]]

fileType Specifies the file type to examine or change
openCommandString Specifies the open command to use when launching
files
of this type.

Type FTYPE without parameters to display the current file types that
have open command strings defined. FTYPE is invoked with just a file
type, it displays the current open command string for that file type.
Specify nothing for the open command string and the FTYPE command will
delete the open command string for the file type. Within an open
command string %0 or %1 are substituted with the file name being
launched through the assocation. %* gets all the parameters and %2
gets the 1st parameter, %3 the second, etc. %~n gets all the remaining
parameters starting with the nth parameter, where n may be between 2 and
9,
inclusive. For example:

ASSOC .pl=PerlScript
FTYPE PerlScript=perl.exe %1 %*

would allow you to invoke a Perl script as follows:
Press any key to continue . . .
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Erik Boling
Guest
Posts: n/a
 
      10-03-2007
Sorry, ok so i figured out what gordon was talking about so i i changed
the ftype and assoc just as he did, then restarted cmd, and I'm still
getting the " is not a valid win32 app" error?
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Erik Boling
Guest
Posts: n/a
 
      10-04-2007
Michael Bevilacqua-Linn wrote:
> Indeed! It's a bunch of config files of different formats scattered
> across
> the file system. Scary thing is, that actually does seem to work better
> than the window registry.


ok soooo, what can i do to fix it!?!?!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Gordon Thiesfeld
Guest
Posts: n/a
 
      10-04-2007
>
> ok soooo, what can i do to fix it!?!?!
> --
> Posted via http://www.ruby-forum.com/.


Here are some things to check:

# Make sure the path to ruby.exe is in your path system environment
variable
C:\>path
PATH=c:\ruby\ruby186\bin;C:\WINDOWS;C:\WINDOWS\Sys tem32\Wbem

# Make sure .rb and .rbw are set in the pathext system environment
variable
C:\>echo %pathext%
COM;.EXE;.BAT;.CMD;.RB;.RBW;.VBS;.VBE;.JS;.JSE;.WS F;.WSH;.tcl;.PSC1

# If it's a problem with these system environment variables, make sure you
set it in the gui, and not with the set command. Otherwise the
changes won't persist. Here's some info on that:
http://support.microsoft.com/kb/310519

What is the output of these commands?

ruby -v

ruby -e 'puts "hello world!"

regards,

Gordon

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Whats going on?? SirReadAlot MCSD 6 09-07-2004 05:03 PM
whats going at home John Hinkel Computer Support 5 06-19-2004 07:00 PM
Re: Whats going on here lynn cardin Computer Support 2 04-22-2004 04:45 PM
Whats going on????? SYLVIA SIMMONS Computer Support 7 12-17-2003 08:01 PM
whats Going On Fred Erfmann Computer Support 6 06-27-2003 02:35 AM



Advertisments