Home
16.
How do the following methods differ: @my_string.strip and @my_string.strip! ?

The strip! method modifies the variable directly. Calling strip (without the !) returns a copy of the variable with the modifications, the original variable is not altered.

17.
What's the difference in scope for these two variables: @name and @@name?

@name is an instance variable and @@name is a class variable.

18.
What is the log that has to see to check for an error in ruby rails?

Rails will report errors from Apache in log/apache.log and errors from the Ruby code in log/development.log. If you're having a problem, do have a look at what these logs are saying. On Unix and Mac OS X you may run tail -f log/development.log in a separate terminal to monitor your application's execution.

19.
What is the use of global variable $ in Ruby?

A class variable starts with an @@ sign which is immediately followed by upper or lower case letter. You can also put some name characters after the letters which stand to be a pure optional. A class variable can be shared among all the objects of a class. A single copy of a class variable exists for each and every given class.
To write a global variable you start the variable with a $ sign which should be followed by a name character. Ruby defines a number of global variables which also include other punctuation characters such as $_ and $-k.

20.
Where does the start_tabnav gets informations for tabs rendering in ruby rail?

The main Symbol let the start_tabnav method known to look for a special MainTabnav class where all are happens.