Sometimes people don’t know how to start learn ruby programming and still searching which book are suitable to them as a beginner. So I’m also as a beginner in ruby and rails programming, will suggest people to get Mr. Neighborly’s Humble Little Ruby Book as a reference to get start with ruby programming. This book will teach you the basic of ruby.
Mr. Neighborly’s Humble Little Ruby Book is a book about this fine language, but it is not a language book per se. It is perhaps best described as a mix between your favorite novel, your favorite Spanish textbook, and a Richard Simmons exercise video: it walks you through the very basics of working with Ruby, but by the end of it, you’ll no doubt be sweatin’ it to the oldies. It covers the base syntax of the language, including working with values, flow control, and object oriented programming, into some of the library functionality of Ruby, such as databases, web services, and string manipulation.
Expect this book to rock your world. Or at least teach you a programming language.
144 pages, 6″x9″
You can download here to get free eBook in pdf format.
Table of contents
1 Welcome to Ruby
Basic Concepts of Ruby
Types in Ruby
Collections
Variables and the Like
2 Break it down now!
Methods
Blocks and Proc Objects
Modules
Files
3 Hustle and flow (control)
Conditionals
Loops
Exceptions
4 The System Beneath
Filesystem Interaction
Threads and Forks and Processes
Environment variables, command line
Win32 and Beyond
5 Looking Beyond Home
Networking and the Web
It’s Like Distributed or Something…
Data my base, please!
6 It’s a Library!
String Manipulation
Date/Time
Hashing and Cryptography
Unit testing
Appendix A Links and the Like Appendix B High Performance Ruby with C/C++
Migration version number was keep trak in database, that means new rails was replace ’shema_info’ with a new table called ’schema migrations’.The old ’schema_info’ in Rails 2.0 just save the number of latest migration that has been execute but ’schema migrations’ table was created to keep trak which migration already execute. In Rails 2.0, sometimes if you are working with another rails developer in same project or merge the branch, they might created a higher migration number then you. So if you run db:migrate, your migration file won’t execute. With the new implement in Rails 2.1 they eliminate this problem.
Change the structure of migration file. See the image below..how different with the Rails 2.0.
10.Relaunch Terminal application
11.Specify database connection in tnsnames.ora
12.Download ruby-oci8 and extract the file. Extract to any location you like.
13.Edit line 17 in ‘/usr/lib/ruby/1.8/universal-darwin9.0/rbconfig.rb’
change to ‘-arch i386′
14.Go to directory where you extracted ruby-oci8 source
15.Execute ruby-oci8 standard installation sequence:
ruby setup.rb config
make
sudo make install
16.Change back file ‘/usr/lib/ruby/1.8/universal-darwin9.0/rbconfig.rb’
You want to make a copy of an existing object: a new object that can be modified separately from the original, Use Object#clone - makes a copy of the metaclass and instantiates the copy, instead of instantiating the object’s original class
My friend ask me what is EdgeRails..this is what i found out :
‘EdgeRails’ is a term which means you are running a local copy of a developmental version of Rails(bleeding edge). It is an alternative to the more standard GemRails, which means you are running one of the stable releases.
‘Bleeding Edge‘ is a term that refers to technology that is so new (and thus, presumably, not perfected) that the user is required to risk reductions in stability and productivity in order to use it.
‘GemRails‘ is preferred method of installing Rails is through the packaging scheme RubyGems that makes it really easy to install libraries and keep them up to date
Advantage : get access to new features or bug fixes that are not in the most recent stable release. . Also EdgeRails allows you to run on computer without Rails installed
Disadvantage : developmental versions are not generally regarded to be stable. So it’s a tradeoff
How to use EdgeRails : embeded a (developmental) version of Rails within your application(copy into the vendor/rails directory) rather than using the version installed on your machine as a library
How to switch from Gemrails to EdgeRails :
Run ‘rake rails:freeze:edge‘ from application home directory to unpack the latest edge rails into application vendor/rails directory. This embeds the Rails framework into your application by using Subversion (svn) to copy the files from the developmental source code repository (dev.rubyonrails.org) into your vendor/rails directory
To revert to GemRails, run command ‘rake rails:unfreeze‘.That command empties the vendor/rails directory