Programming Ruby (2nd edition) ppt

833 1,337 0
  • Loading ...
1/833 trang
Tải xuống

Thông tin tài liệu

Ngày đăng: 06/03/2014, 17:20

[...]... command to search for Ruby packages # apt-cache search ruby interpreter libapache-mod -ruby - Embedding Ruby in the Apache web server liberb -ruby1 .6 - Tiny eRuby for Ruby 1.6 liberb -ruby1 .8 - Tiny eRuby ruby - An interpreter of object-oriented scripting language Ruby ruby1.7 - Interpreter of object-oriented scripting language Ruby ruby1.8 - Interpreter of object-oriented scripting language Ruby You can install... with its environment Part II, Ruby in Its Setting, investigates this Here you’ll find practical information on using Ruby: using the interpreter options, using irb, documenting your Ruby code, and packaging your Ruby gems so that others can enjoy them You’ll also find tutorials on some common Ruby tasks: using Ruby with the Web, creating GUI applications using Tk, and using Ruby in a Microsoft Windows... utility, as many now support tar-format files) % tar xzf snapshot.tar.gz ruby/ ruby/ bcc32/ ruby/ bcc32/Makefile.sub ruby/ bcc32/README.bcc32 : : : This installs the Ruby source tree in the subdirectory ruby/ In that directory you’ll find a file named README, which explains the installation procedure in detail To summarize, you build Ruby on POSIX-based systems using the same four commands you use for most... :pserver:anonymous@cvs .ruby- ←֓ login (Logging in to anonymous@cvs .ruby- CVS password: ENTER % cvs -z4 -d :pserver:anonymous@cvs .ruby- ←֓ checkout ruby The complete source code tree, just as the developers last left it, will now be copied to a ruby subdirectory on your machine This command will check out the head of the development tree If you want the Ruby 1.8 branch, add -r ruby_ 1_8... you can find Ruby supfiles on the ruby- lang site at http://cvs .ruby- Interactive Ruby One way to run Ruby interactively is simply to type ruby at the shell prompt Here we typed in the single puts expression and an end-of-file character (which is Ctrl+D on our system) This process works, but it’s painful if you make a typo, and you can’t really see what’s going on as you type % ruby puts... and you can run Ruby GUI applications by double-clicking their names in Explorer 2 If your system supports it, you can avoid hard-coding the path to Ruby in the “shebang” line by using #!/usr/bin/env ruby, which will search your path for ruby and then execute it Prepared exclusively for Yeganefar RUBY D OCUMENTATION : RD OC AND RI 7 Ruby Documentation: RDoc and ri As the volume of the Ruby libraries... for a suitable Ruby RPM Enter ruby as a search term, and select from the listed version numbers, architectures, and distributions For example, ruby- 1.8.2.i386 is a binary distribution of Ruby 1.8.2 for Intel x86 architectures Prepared exclusively for Yeganefar 2 I NSTALLING RUBY 3 For Debian dpkg-based Linux systems, you can use the apt-get system to find and install Ruby You can use the apt-cache... Part I Facets of Ruby Prepared exclusively for Yeganefar 1 Chapter 1 Getting Started Before we start talking about the Ruby language, it’d be useful if we helped you get Ruby running on your computer That way you can try sample code and experiment on your own as you read along We’ll also show you some different ways to run Ruby Installing Ruby Quite often, you won’t even need to download Ruby It now comes... includes Ruby (although the version of Ruby preinstalled on OS X is normally several minor releases behind the current Ruby version) Try typing ruby -v at a command prompt—you may be pleasantly surprised If you don’t already have Ruby on your system, or if you’d like to upgrade to a newer version, you can install it pretty simply But first, you have a choice to make: go for a binary distribution, or build Ruby. .. reference for the Ruby programming language If you have the first edition, you’ll find that this version is a significant rewrite When Andy and I wrote the first edition, we had to explain the background and appeal of Ruby Among other things, we wrote “When we discovered Ruby, we realized that we’d found what we’d been looking for More than any other language with which we have worked, Ruby stays out of . pages of Programming Ruby, programming in any language other than Ruby will feel like you’re pushing rope.”Mike Clark, Author and Consultant Ruby is sma. y0 w1 h1" alt="" Developers the world over talk about Programming Ruby and the Ruby language. . . Ruby is a wonderf ully powerful and useful language,
- Xem thêm -

Xem thêm: Programming Ruby (2nd edition) ppt, Programming Ruby (2nd edition) ppt, Programming Ruby (2nd edition) ppt

Mục lục

Xem thêm

Gợi ý tài liệu liên quan cho bạn

Nhận lời giải ngay chưa đến 10 phút Đăng bài tập ngay