Https://ruby-china.org/wiki/install_ruby_guideHow to quickly and correctly install Ruby and rails runtime Environments
For new entry-level developers, installing Ruby, Ruby gems, and rails running environments may be a problem. This section describes how to quickly install the ruby
Ror may be the biggest difficulty for beginners, that is, the installation and setup of the development environment. Today, it has been around for a long time, and the process has been posted here, so that beginners can avoid detours.
1. Install Ruby 1.8.6
Open http://rubyforge.org/frs? Group_id = 167, install the final version of ruby1.8.6-26
After the download is complete, enter the ruby-V verification ve
In Ruby, everything is an object. This is very popular for users who like to use highly object-oriented languages (such as Smalltalk, Eiffel or clos. For example, 1, 2, 3, or 10.8 are all objects, rather than the original type in Java or C ++. strings are objects, and classes and methods are also objects. For example, the following are all valid Ruby code (in ruby
I remember that when I used ruby1.9.x in OS X10.8, I just had to download and install ActiveTcl8.5, and run TK well without any configuration. But recently want to re-execute the TK code, found in require ' TK ' when the error bird! The ruby2.1.3 version is now in use. Search the Internet, the version after 1.9.x no longer TCL/TK support compiled into Ruby, so if you want to use it must be recompiled ruby!
Ruby on Rails on mac====================================================================================http:// Morizyun.github.io/blog/marvericks-rails-setup-ruby-rvm-msyql/for general:useful:http://qiita.com/keneo/items/ 0a58b188183b5100e3affor mysql:http://qiita.com/hkusu/items/cda3e8461e7a46ecf25dhttp://dev.classmethod.jp/ SERVER-SIDE/LANGUAGE/BUILD-RUBY-ENVI
Ruby on Rails on mac====================================================================================http:// Morizyun.github.io/blog/marvericks-rails-setup-ruby-rvm-msyql/for general:useful:http://qiita.com/keneo/items/ 0a58b188183b5100e3affor mysql:http://qiita.com/hkusu/items/cda3e8461e7a46ecf25dhttp://dev.classmethod.jp/ SERVER-SIDE/LANGUAGE/BUILD-RUBY-ENVI
Here you can download the latest Ruby version that is right for you, and the current stable version is 1.8.6. Please read Ruby open source license before downloading.
Ruby Source Code
Installing from source is the best solution if you want to make it more compatible with your platform or if you need to set up your environment in a single-minded way. This is als
Open Class and Monkey patchesin Ruby, a class defines a method that does not differ from any other statement, and is executed on a line. The following example:
Class Example
def method_1
puts ' method 1 '
end
class Example
def method_2
puts ' Method 2 ' End end
In this case, when the class example is first defined, there is not a class called example, so Ruby starts to define
There are many popular frameworks for online Web application development at the moment. There are also many different types of frameworks, such as those with a large number of plug-ins that can make you faster iterations (such as Rails), or other very simple and low-level (like flask).Two relatively more popular frameworks in Web application development are Ruby on Rails and Laravel. All two of them are very mature projects that have been available fo
Ruby is an open source dynamic programming language that has beautiful syntax for building scalable Web applications. Ruby Gems can be a good way to improve the development efficiency of ruby developers.
There are several ways to install Ruby on an Ubuntu system, and each method takes only a few steps to get it done.
Ruby methods are very similar to functions in other programming languages, and Ruby methods are used to bundle one or more duplicate statements in one cell.
The method name should start with a lowercase letter. If the name of a method starts with an uppercase letter, Ruby might think that this is a constant, so the call can be parsed correctly.
Method should de
When learning a new programming language, we must be clear about a few questions:What is the type model of the language?Strongly typed / weakly typed, static type / dynamic typeThe type model changes the way the problem is handled and controls how the language runsWhat is the programming paradigm of language?Object-oriented, functional, procedural, etc.How to interact with the language?Compiling, interpretingWhat is the judgment structure of language (decision construct) and the core data struct
New year to new language which is more suitable? Experience with PHP and C #
Reply content:So many python?!. I recommend Ruby Bar, Blossom, hehe ~ and Ruby's meta-programming ability is stronger, it may be more interesting to write-your colleague's work will use Python or ruby? If so, then what they learn with what, later good rejoined.
in PHP and C #, your work may be related to the front desk page and th
Use Fastlane for fast, continuous updates and a range of issues during installation:1. Installing the Fastlane:sudo gem install FastlaneErrorERROR: Failed to build gem native extension.--remove http://rubygems.org/-a https://ruby.taobao.org/# View current gem source gem sources* * * * sourceshttp://ruby.taobao.org- -UErrors still exist;And then I found out that it was a ruby version.2. Update the ruby vers
I was eager to learn something new. I heard that ROR is very efficient in development, so I chose Ruby on Rails. It was really difficult to install it, here I will write down my installation experience:
1) install Ruby
Download installation package: http://rubyforge.org/frs? Group_id1_167,what I download is rubyinstaller-1.8.7-p302.exe
After installation, you can use
Github + Jekyll -- create a personal free blog (2) Ruby + Jekyll deployment
Abstract:
In this article, I will introduce how to set up a personal Blog (Blog) on github. By the way, let's take a look at githubPages, and also involve Jekyll technology.
============================================ ======================================
I. Environment deployment:
1. Download resources:
We have said that the Jekyll used to generate Web pages is based on
Any method defined by a class in Ruby can accept a process object (Proc) as an additional parameter, in a method, you only need to use the yield expression to call this process object. During the call, the parameter of the object is specified by the yield expression, and its return value is returned as the value of the yield expression.
The following is an example in the ruby document.
Def threetimes The
Blank characters include space characters, tabs, and line breaks. They are not tags, but are used to separate different tags, so that they are not merged into a tag.
Note:Sometimes blank characters are required, and some are actually forbidden.
1. linefeed used as the statement TerminatorEach statement in C and Java must end with a semicolon. In Ruby, you can use semicolons to terminate the statement, but this is not necessary. Only when you tryCo
Some important differences between Ruby and C # are as follows:
1. Ruby is a dynamic language, and C # Is a static language-that is, after an object is new, Ruby can dynamically add some attributes or methods to the object instance (as does JavaScript)
2. ruby deliberately weakens the concept of variable types. By defa
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.