Whats going on!?!?

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/.

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
Test Driven Ajax (on Rails) [Book]
^ assert_xpath

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

···

On 10/2/07, Erik Boling <schmode93@yahoo.com> 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?

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

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

- Arlen.

···

On Tue, 2007-10-02 at 23:43 +0900, Phlip wrote:

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

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

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.

···

On 10/2/07, Arlen Christian Mart Cuss <celtic@sairyx.org> wrote:

On Tue, 2007-10-02 at 23:43 +0900, Phlip 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 ...

- Arlen.

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/.

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/\.

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

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\System32\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;.WSF;.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

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/\.

# 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\System32\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;.WSF;.WSH;.tcl;.PSC1

OK i did both of these checks, both are seem to be fine.

C:\>path
PATH=c:\ruby\bin;C:\GTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\W
bem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program
Files\Quick
Time\QTSystem\;C:\Program Files\ATI Technologies\ATI.ACE\

C:\>echo %pathext%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW

C:\>

···

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

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/.