How to install Ruby on Windows 7? Chris Pine book
I just bought Learn to Program by Chris Pine and can not get past the installation of Ruby for Windows.
The book was updated about 10 month's ago and seems to be outdated already.
It says to download the latest version from rubyinstaller.org which I did. After that it says to make a new desktop folder and name it programs. Done.
Now click the programs folder open and right-click in the folder->New->Select Ruby Program. Which no such file exists. What do I do?
Also, it says a text editor called Sci开发者_C百科te comes with it but seems to not come with the download.
Can anyone help on what to do or any suggestions?
SciTe is no longer bundled with the Windows One-click Ruby installer. I liked the ability to press F5 and execute your source file, ruby keyword highlighting and symbol autocompletion.
To execute ruby statements interactively, you can use irb (Interactive Ruby) in the Start Menu folder for Ruby.
The other approach is to create a .rb file in any text-editor. Save it and then run it with ruby path-to-source\file.rb
from a command prompt. Ensure that the Ruby bin subfolder (e.g. D:\dev\Ruby192\bin since I installed in d:\dev) is included in your PATH environment variable.
You don't need that menu item to create new programs, you can use Notepad, the Excelent and Free Notepad-Plus, or Scite that you need to download separatedly. To run your Ruby apps, you can either use the command line (Windows > Run > cmd) or drag and drop to the Ruby link you installed.
Another option if you don't mind also installing rails is the Rails Installer. It's a project by Engine Yard in attempt to give windows users easy access to Rails. It just came out Jan 18, 2011 so it's very current.
Heck, I consider installing rails a bonus :)
精彩评论