"Ruby.Exe Is Not Recognized as an Internal or External Command" in Windows 7

ruby command is not recognized on Windows (The system cannot find the path specified)

It sounds like Ruby is not in the path.

Try specifying the full path to the Ruby Executable.

"C:\Your\Path\To\Ruby\Install\Ruby.exe"

assuming that works edit the path variable to add Ruby's path:

Path %PATH%;C:\Your\Path\To\Ruby\Install

That will then allow Ruby to run directly by just typing the executable's name.

ruby.exe not recognised when trying to login & use heroku

Also a newbie here, trying to get rails with heroku running. I ran into exactly the same problem today, first the "Could not find RubyGem railties" issue and then after uninstalling Ruby 1.9.2, the problem with heroku not working anymore. I found 2 ways around it, but not sure if either one is great.

Don't uninstall the ruby version that comes with the toolbelt. Instead either

(1): remove it from the PATH. For me, the toolbelt installation added c:\program files\ruby1.9.3 to my PATH system variable. I already had c:\ruby193 (where I installed ruby myself previously) in my user PATH variable. After removing the one that the toolbelt added from PATH, things started working.
(note: the c:\ruby193 should be placed before c:\program files\heroku\bin int the PATH system variable or else it wont work)

(2): alternatively, I moved c:\ruby193 from my user PATH to my system PATH. Re-installed the toolbelt, and both ruby and heroku work now. But I do have both versions of ruby in my PATH variable.

Not sure if either way is great because I suspect I now have two versions of ruby installed and being used depending on what I'm doing. But at least allowed me to move on to the next problem, now stuck trying to install heroku plugins.

I thought ruby on rails was supposed to make things easy. It's been 4 days of trying to configure 30 different new tools (end rant)

Ruby on Windows: Require is not recognized as an internal or external command

Ruby and DOS Batch are two completely different programming languages that have absolutely nothing to do with each other. You simply cannot expect an interpreter for DOS Batch to be able to run Ruby code and vice versa. (Especially considering that Ruby didn't even exist when CMD.EXE was written, so how could CMD.EXE possibly know how to interpret Ruby code?)

You need to run Ruby code in a Ruby interpreter (or use a Ruby compiler to compile it to something that you have an interpreter for).

IO.open says a command is not recognized

I'm pretty sure it's a 64-bit (WOW64) redirection problem.

Try something like

cmd = "#{File.join(ENV['windir'], 'sysnative', 'pslist.exe'} |  findstr notepad"

and see if that works.

rake is not recognized as an internal or external command, my PATH is set correctly

The problem is that you don't have any files in your path that Windows thinks are executable (.bat, .cmd, or .exe). Usually when Rake is installed, it recognizes you are running on Windows and installs the appropriate rake.bat file.

The first thing to try is reinstalling Rake:

gem uninstall rake
gem install rake -v=0.8.7

If that doesn't work, you can always try running Rake by using the Ruby executable directly:

ruby C:\path\to\ruby\bin\rake your_rake_task

How do I do a proper Compass installation on Windows 7?

@djthoms's response worked, but as it turns out I had ruby installed incorrectly as I did not check the box that said "create ruby in the PATH" (or something to that extent), which makes 'ruby' a recognizable command.

Again, during the installation process of ruby to windows, you must check a box in order for the installation to work correctly - it is not already checked.

bin\setup' is not recognized as an internal or external command, operable program or batch file

The error: bash: bin/setup: No such file or directory, in this case, means that you're trying the setup the wrong file/folder.

In order to make it work, after you've cloned the project from Github, you'll need to access the correct application folder (e.g. app_example_name), and from there you should be able to do:

  1. bin/setup
  2. rails server or rails s (It's the same)
  3. Visit http://localhost:3000/

Sometimes, you'll also need to install the ruby version of the cloned application first, and then you should be able to go.



Related Topics



Leave a reply



Submit