It's really tedious to install/update the Ruby environment under your Mac.First, Mac OS X comes with a ruby environment, and we manage the Ruby version with RVM (Ruby version manager)Just execute the following 2 sentences:$ gpg2--keyserver
The above rough introduction of the next Ruby, originally did not want to install this, because I was learning through the website, can be compiled online. But given the comprehensiveness of the content, try it.Refer to the next person's
1. User model(1) Database migrationRails uses a relational database to store data by default, with tables in the database consisting of data rows, each row having corresponding columns, and corresponding data properties. Once the column names are
In a nutshell, it isClass can instantiate module noEverything else is the same.A little difference in inheritanceClass is a keyword that uses Application Scenarios for moduleAs a namespace, put the general const or their own class as mixin, put the
Installing the ruby Environmentinstalling Ruby through homebrew1. First, you need to install the homebrew on the systemAt the command line, execute the following command to complete the Homebrew installation (you will be prompted for the current
Gsub ()The first parameter is Reg, and the second parameter is the character that is replaced.Returns the changed string with no side effects on the original string.No match will return the original string.irb(main):001:0"regWord"=>"regWord"irb(main)
1. Download Ocra-1.3.1.gem file2. Open the "Start command prompt with Ruby" Command Window3. Enter "Gem install e:\ocra-1.3.1.gem-l" Installation Gem,#=> "successfully installed ocra-1.3.1"4, enter "D:\>ocra youruby.rb" to start packaging, #=>
This article focuses on learning about Ruby you need to know about knowledge (RVM, GEM, bundle, rake, rails, etc.), the needs of friends can refer to the nextRubyThat's not going to be a lot.RVMTo help you install the Ruby environment, help you
This two weeks work more content, usually oneself also a bit not in the state, learn something a little, take advantage of now still a bit state, hurriedly review before study of Ruby Bar.Ruby was the first language that I really started to touch
Naming style guide in Ruby programming and ruby programming style guide
Name the identifier in English.
# bad - identifier using non-ascii characters заплата = 1_000 # bad - identifier is a Bulgarian word, written with Latin letters (instead of
Analysis of the use of regular expressions in Ruby, analysis of ruby Regular Expressions
If you only need to search for the text of a string, do not use a regular expression: string ['text']
You can use string [/RE/] to query a simple structure.
Ruby configures rspec and RestClient to detect the server, rspecrestclient
If you manually test the Restful service, it will be very monotonous. Of course, there are some browser plug-ins that can help you manually test through visual interfaces,
Basic Ruby syntax and ruby syntax
There are multiple ways to create a String object. The most common method is to use the string literal (literals), that is, the character sequence between a group of single quotes or double quotes. The difference
Ruby implements the longest common subsequence algorithm and ruby sequence algorithm.
Longest Common subsequence, LCS, dynamic planning implementation.
#encoding: utf-8#author: xu jin, 4100213#date: Nov 01, 2012#Longest-Commom-Subsequence#to find a
The usage of the Profiling tool in Ruby, rubyprofiling
The built-in profiler implementation is very simple. In ruby2.2, there are only 150 lines of code. You can see its implementation profile. rb. The built-in profiler is very convenient to use.
Use of each and collect in Ruby for iteration, rubycollect
The iterator is nothing, but the set method is supported. Objects that store a group of data members are called collections. In Ruby, arrays and hashing can be called collections.
The
For example, Ruby on Rails's page caching mechanism, rubyrails
With the page cache, Rails can no longer intervene. To some extent, this is a good thing, because you can indeed achieve excellent performance. Rails only needs to create an HTML page
Every programmer should learn to use Python or Ruby
If you are a student, you should be C, C ++ and Java. There will also be some VB, or C #/. NET. You may have developed some Web pages. You know some HTML, CSS, and JavaScript knowledge. In general,
Basic Ruby knowledge
Create class: the class name is followed by the class name. The first letter of the class name must be capitalized. The new method is used for instantiation. The constructor in c # has the same name as the class. In ruby, the
Brief description of the iterator in Ruby and brief description of the Ruby Generator
The iterator is a method supported by the set. Objects that store a group of data members are called collections. In Ruby, arrays and hashes can be called
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service