Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ruby Ò»²½²½°²×°


http://www.gayathri-frenzy.com/technology/ruby-on-rails
I kept thinking for a while on what do I have next in the store
Here we go “Ruby on Rails”
Ruby on Rails, often shortened to Rails or RoR, is an open source web application framework for the Ruby Programming language.Ruby is a pure object-oriented programming language with a super-clean syntax that makes programming elegant and fun.
What is Rails?
Rails is an open source Ruby framework for developing web-based, databasedriven applications. Dozens of frameworks are out and most of them have been around much longer than Rails. Why do we then have a different framework?
Rails help us in developing a web application at least ten times faster than we can with a typical Java framework. We can–without making any sacrifices in the quality of our application!
When I got started with this topic, I just lacked a proper installation guide to help me with the installation. So I’m trying to make my reader’s life easier.
Ruby on Rails Installation:
To develop a web application using Ruby on Rails Framework, install the following software:
· Ruby
· The Rails framework
· A Web Server
· A Database System
We can use the WEBrick Web Server which comes with Ruby.Rails works with many database systems, including MySQL, PostgreSQL, SQLite, Oracle, DB2 and SQL Server.
Rails Installation on Windows:
1. Install Ruby
Download an installation package from rubyinstaller.rubyforge.org.
Follow the download link, and run the resulting installer. We will get RubyGems along with this package.
2. With Ruby Gems loaded, we can install Rails and its dependencies through the command line.
C:\> gem install rails –include-dependencies
We would get the following error:
C:\Ruby>gem install rails –include-dependencies
INFO: `gem install -y` is now default and will be removed
INFO: use –ignore-dependencies to install only the gems you list
ERR


Ïà¹ØÎĵµ£º

Ruby 101£º¶¯Ì¬±à³Ì


Ruby 101£º¶¯Ì¬±à³Ì
Written by Allen Lee
µ±method_missingµÄħ·¨Ê§Ð§Ê±……
      ÔÚÉÏһƪÎÄÕÂÀÎÒÃÇͨ¹ýÖØдHashÀàµÄmethod_missing·½·¨°ÑHash¶ÔÏóÄ£Äâ³ÉÄäÃû¶ÔÏ󣬵«ÊÇ£¬ÕâÖÖ×ö·¨ÓÐʱ»á²úÉúһЩĪÃûÆäÃîµÄÎÊÌ⣬¾Ù¸öÀý×Ó°É£¬¼ÙÈçÎÒ°Ñprocess·½·¨£¨ÍêÕûʵÏֲμûÉÏһƪÎÄÕ ......

Ruby Shoes µÄÊó±êʼþ

ÒòΪһ´ÎżȻµÄ»ú»á½Ó´¥ÁËRubyÓïÑÔ¡£È»ºóÏÂÔØÁËRuby Shoes¹¤¾ß¡£
·¢ÏÖRuby»¹ÊÇÂùÓÐȤµÄ¡£
»¨ÁËÒ»¶Îʱ¼äÊìϤÁËËüµÄÓï·¨¡£
ÏÂÃæÀ´ÊÔÊÔËüµÄÊó±ê¹¦ÄÜ¡£
Shoes.app do
  #ͼƬ³õʼ»¯
  @img = image "http://www.google.cn/intl/zh-CN/images/logo_cn.gif"
  #ͼƬ¹ØÓÚÊó±êµÄµ÷ÓÃ
 & ......

Rails¡¢Ruby¡¢JAVAÇ°¾°±È½Ï

        ÔÚÂÛ̳Àï¿´ÁËdaquan198163ËùдµÄ¡¶³õѧRORµÄÒÉ»ó¡·ÕâƪÎÄÕ£¬robbinÔڻظ´ÖиøÁËÏêϸµÄ½â´ð£¬¿ÉÊÇ¿´Íê½â´ðÖ®ºó£¬ÎÒÒ²²úÉúÁËһЩÒÉ»ó£¬ÔÚ´ËÏëÎÊÎÊ¡£
        ÔÚrobbinËù¸ø³öµÄ½â´ðµ±ÖУ¬¸ü¶àµÄÊDzûÊörailsµÄºÃ´¦£¬È»¶ø´ó¼Ò¶¼ÖªµÀ£¬railsÖ»Ê ......

×Ô¶¯»¯²âÊÔ֮·£¨Èý£© rubyÀïµÄgetÓëset·½·¨

ÕÕÀý¿ÉÒÔÏÈ¿´¶Ë³ÌÐò
class Person
 
  def initialize( name,age=18 )
    @name = name
    @age = age
    @motherland = "China"
  end
 
  def talk
    puts "my name is "+@name+", age is "+@age.to_s
 &n ......

½»»¥Ê½ Ruby Shell irb

irb ÊÇ´ÓÃüÁîÐÐÔËÐеÄ
irb µÄÃüÁîÐÐÑ¡Ïժ×Ô¡¡Porgramming Ruby µÚ¶þ°æ£©
-f
½ûÖ¹¶ÁÈ¡~/.irbrc¡¡Suppress reading ~/.irbrc.
-m
Êýѧģʽ£¨Ö§³Ö·ÖÊýºÍ¾ØÕ󣩡¡Math mode (fraction and matrix support is available).
-d
ÉèÖÃ#DEBUGΪtrue(ͬruby -dÒ»Ñù)¡¡¡¡Set $DEBUG to true (same as ``ruby -d'').
-r lo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ