rubyÀà±äÁ¿ÔÚdevelopmentģʽʧЧ
·ÖÒ³ÖÐÓõ½Àà±äÁ¿£¬Ö÷ÒªÊÇÓÃÀ´±ê¼Ç¡°Ò³ÂëÊäÈë¿ò¡±µÄid Èç¹ûÒ»¸öÒ³ÃæÓм¸¸ö·ÖÒ³£¬¡°Ò³ÂëÊäÈë¿ò¡±µÄidÒªÊDz»Í¬µÄ²ÅÄÜ·ÖÇåÊÇÄĸöÒª·ÖÒ³¡£Ê¹ÓÃÀà±äÁ¿¾ÍÊÇΪÁË´ïµ½Õâ¸öÄ¿µÄ£¬ÈÃËùÓеĶÔÏóʵÀý¹²ÓÃÒ»¸ö±äÁ¿£¬²»±ØÃ¿´ÎÖØÐ³õʼ»¯±äÁ¿¡£ Àà±äÁ¿Ê¹ÓôúÂëʾÀý 1 require 'ruby-debug'
2 debugger
3 class Myclassvar
4 @@a=1
5 puts 1111111111111111111111
6 puts @@a
7
8 def testa
9 @@a=@@a+5
10 end
11 def testb
12 @@a=@@a+3
13 end
14 end
15
16 class Reclassvar < Myclassvar
17 def testa
18 @@a+=10
19 end
20 end
21
22 obj=Myclassvar.new
23 puts obj.testa
24 puts obj.testb
25 obj2=Myclassvar.new
26 puts obj2.testb
27 obj3=Reclassvar.new
28 puts obj3.testa
Ö´ÐÐ˳ÐòÊÇ 3=>4=>5=>6=>8=>11=>16=>17=>22=>23=>9=>24=>12=>25=>26=>12¡¡
±¾µØ²âÊÔÀà±äÁ¿ÍêÈ«·ûºÏÔ¤Ï룬µ«ÊÇÏîÄ¿ÖеķÖÒ³Óõ½µÄÀà±äÁ¿È´ÊÇÿ´Î¶¼Òª³õʼ»¯£¬Ò»¶ÈÓôÃÆÖС£½á¹ûÊÇÒòΪRails¿ªÔÚdevelopmentģʽʱÅäÖÃÖÐÓÐconfig.cache_classes = false£¬ËùÒÔÎÒÃÇÿ´Î²»ÓÃÖØÆô·þÎñ¾Í¿ÉÒԲ鿴¸üдúÂëºóµÄÔËÐнá¹û¡£¶ø·þÎñÆ÷ÉϵijÌÐòÊÇ¿ªÆôÔÚproductionģʽ£¬ÆäÖÐconfig.cache_classes = true¡£Õâ¾ÍÊÇΪʲôÀà±äÁ¿ÔÚdevelopmentģʽ»áʧЧ£¬Ã¿´ÎÖØÐÂÔØÈëij¸öÀàʱ£¬ËüµÄËùÓÐÀà±äÁ¿¶¼»áÔٴγõʼ»¯¡£
Ïà¹ØÎĵµ£º
To get it done is not easy. I spent a whole day to figure out the various compatibility issues along the way out.
Now there still might be potential issues, but it works by my rough test.
Step 1: Install Apache Cassandra
You may know that the Ruby gem cassandra will do it for you.
  ......
The following is improved version of the code created by David Mullet, from
http://rubyonwindows.blogspot.com/2007/03/ruby-ado-and-sqlserver.html
require 'win32ole'
class SqlServer
# This class manages database connection and queries
attr_accessor :connection, :data, :fields
attr_wr ......
b = "123"
a = b
b.gsub!(/2/,"")
puts a
µÃµ½µÄ½á¹ûÊÇ13£¬·¢ÏÖÈç¹ûa = bµÄ»°Ã²ËÆÖ»ÊǰÑbµÄÖ¸Õë¸øÁËa£¬µ«ÊÇÈç¹ûbµÄÖµ·¢ÉúÁ˱仯a²ÅÄÜ´ÓbÖжÀÁ¢³öÀ´¡£
Èç¹û°ÑÉÏÃæµÄ´úÂë¸Ä³É
b = "123"
a = "#{b}"
b.gsub!(/2/,"")
puts a
ÔòµÃµ½µÄ½á¹ûΪ123£¬ÕâÀïÊǰÑbµÄÖµ¸øÁ ......
ÔÚRuby on RailsÖÐÕæµÄÓÐÒ»¶ÑSelect helper¿ÉÒÔÓÃ,ÎÒÃǾ³£ÈÝÒ×»ìÏý¡£³£¼ûµÄÓÐÈý¸ö..
select, select_tag, collection_select(ÆäÓàµÄʲôselect_dateÄÇЩ²»Ì¸)
ÎÒÃÇÏÈÀ´¿´¿´Ò»¸ö»ù±¾µÄÏÂÀʽѡÏî¹Ç¼Ü
</p>
<select
name="ROR">
<option
value="1">ROR1</option><br
/>
<optio ......