First, the introduction
Ruby on Rails is just a factor in making Ruby great, as EJB is just one part of the Java Enterprise platform. This article will bring you together as a Java developer, leveraging only the functionality that Ruby itself can
Create Rails Project
To create a normal Rails project, you can use the following command directly:
Rails New Blog
But in the country because the speed of connection RubyGems is too slow, and Rails by default after building the project
Ruby provides a complete set of implementation methods in the I/O-related kernel modules. All I/O methods come from the IO class.
Class IO provides all the basic methods, such as read, write, gets, puts, ReadLine, getc, and printf.
This chapter
First, the number
Ruby supports integers and floating-point numbers, and integers can be arbitrary lengths
A range of integers are stored in binary, they belong to the Fixnum type, and are automatically converted to the Bignum type when
1.Block:
A block in Ruby is a block of code consisting of multiple lines of code that can often be considered an anonymous method, commonly used to iterate over an array or range (such as each, The Times method), and the syntax format is as follows:
article = nilarticle.nil? # => trueempty?Checks if an element-like a string or an array f.e.-Is empty:# Array[].empty? #=> true# String"".empty? #=> trueRails adds the method to the blank? Object class:
An object is blank if it ' s
This problem found during development todayThe per function of kaminari cannot be used in any configuration, and the page size is fixed at 30.At first, I thought it was the gem of ransack. I searched the internet for a long time and found that
I. Railway
1.1 create a rails Application
Program
$ Rails app_name
Optional:
-D, database = xxx specifies to install a database (MySQL Oracle PostgreSQL sqlite2 sqlite3), which is a database by default
-R, ruby-Path = specifies the ruby
In the rubyforge projectEmacs-railsPackage: Ruby support for Emacs under the MISC directory in the ruby release.NxhtmL The use of Emacs addon provides strong support for ror project development.
Briefly describe the installation and configuration
Next, let's get started with Ruby on Rails (ROR ).First, we need to quickly configure the development environment of Ruby on Rails.1. Download InstantRails-2.0-win.zipCan go to official download, http://rubyforge.org/frs? Group_id = 904You can also
Ruby error prompt:
Class/Module name must be constant
= Begin to commentThis is also comment
= End
Puts "nolonggercomments ";
# Rdoc rules# = Headers# This is header content#== Sub Headers# This is sub header content#=== Sub Headers# This is sub
Install and use bundler in Ruby to manage multiple versions of gem and rubybundler
With rbenv to manage a multi-version ruby environment, we also need a tool that can manage multiple versions of gem (such as rails), that is, bundler. The project
Simple Socket programming tutorial in Ruby, rubysocket Programming
Ruby provides two levels of network access services. At the underlying layer, you can access the Operating System. This allows you to implement basic socket support for
Ruby, PHP, and Shell are used to calculate prime numbers of less than 50. rubyshell
Ruby's method of finding the prime number within 50 is the easiest way to compare PHP and SHELL methods, but the SHELL can use the factor command, while PHP does not
Ruby on Rails (also called Rails) is a Ruby Framework for Internet applications that support databases, what are the core features of Ruby on Rails and the articles into the world of Ruby on Rails reported before BKJIA?" This article focuses on how
Ruby on Rails is a complete framework for developing database-driven network applications. Recently, the latest version of Ruby on Rails 3.0 RC has been officially released and is available for download. The blog of the Ruby on Rails development
Brief explanation of the scope of Ruby Object-Oriented Programming and ruby Object-Oriented Programming
Scope
Ruby does not have nested scopes (internal scopes, which can be viewed as external scopes). Their scopes are completely separated. Once a
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.