Whats going on!?!?

Discussion in 'Ruby' started by Erik Boling, Oct 2, 2007.

  1. Erik Boling

    Erik Boling Guest

    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, Oct 2, 2007
    #1
    1. Advertising

  2. Erik Boling

    Phlip Guest

    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
     
    Phlip, Oct 2, 2007
    #2
    1. Advertising

  3. On 10/2/07, Erik Boling <> 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
     
    Gordon Thiesfeld, Oct 2, 2007
    #3
  4. Erik Boling

    Phlip Guest

    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
     
    Phlip, Oct 2, 2007
    #4
  5. Erik Boling

    Erik Boling Guest

    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/.
     
    Erik Boling, Oct 3, 2007
    #5
  6. Erik Boling

    Phlip Guest

    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
     
    Phlip, Oct 3, 2007
    #6
  7. Erik Boling

    Erik Boling Guest


    > 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/.
     
    Erik Boling, Oct 3, 2007
    #7
  8. Erik Boling

    Erik Boling Guest

    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/.
     
    Erik Boling, Oct 3, 2007
    #8
  9. Erik Boling

    Erik Boling Guest

    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, Oct 4, 2007
    #9
  10. >
    > 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
     
    Gordon Thiesfeld, Oct 4, 2007
    #10
  11. Erik Boling

    Erik Boling Guest


    > # 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/.
     
    Erik Boling, Oct 5, 2007
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neo

    whats this error??

    Neo, Jan 31, 2005, in forum: VHDL
    Replies:
    4
    Views:
    508
  2. sophie

    Whats going on - Char to Int Q:

    sophie, Jan 24, 2006, in forum: C Programming
    Replies:
    4
    Views:
    260
    Dave Thompson
    Feb 6, 2006
  3. Wardeaux

    Whats going on?

    Wardeaux, Feb 6, 2004, in forum: ASP .Net Web Controls
    Replies:
    6
    Views:
    148
    Jeffrey Tan[MSFT]
    Feb 12, 2004
  4. jason
    Replies:
    2
    Views:
    130
    jason
    Sep 16, 2003
  5. stephen O'D

    Hash of arrays - whats going on?

    stephen O'D, Jul 19, 2007, in forum: Ruby
    Replies:
    2
    Views:
    109
    Ben Bleything
    Jul 19, 2007
Loading...

Share This Page