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

Install Cassandra with Ruby 1.9.1 on Windows

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.
  To me, I simply want to keep Cassandra independent from Ruby stuff, to ease the upgrade and administration.
  Refer to my blog "Setup Cassandra on Windows"
  (http://blog.csdn.net/goodxp/archive/2010/02/26/5327732.aspx) for details.
Step 2: Install Thrift (0.2.0)
  If you do "gem install cassandra", it should install thrift automatically (being a dependency).
  However, there is a compatibility issue on thrift with Ruby 1.9, so to fail Cassandra gem installation.
  It will be better to install thrift first and fix it before installing cassandra gem.
  Refer to my blog "fix thrift 0.2.0 installation with ruby 1.9.1"
  (http://blog.csdn.net/goodxp/archive/2010/02/28/5333145.aspx) for details.
 
Step 3: Install gem Cassandra
  This part is easy:
 
  $ gem install cassandra
  Do NOT do this: "$ cassandra_helper cassandra". It does not work.
  I did not dig deeper since I already have a working up-to-date version of Cassandra 0.5.0 installed.
  Switch to Cassandra bin folder and start cassandra server:
  $ cassandra -f
 
  Open another command console window:
 
  $ irb
  irb> require 'rubygems'
  irb> require 'cassandra'
 
  If you see a warning pop-up window asking for "msvcrt-ruby18.dll", do this:
 
  irb> quit
  $ gem uninstall json
 
  Don't worry, Ruby 1.9 has a good json support.
  Now run irb again as above, and then:
 
  irb> include Cassandra::Constants
  irb> db = Cassandra.new 'Keyspace1'
 


Ïà¹ØÎĵµ£º

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

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

ruby Ï̵߳ÄÐÔÄܲâÊÔ

ÔÚʹÓÃÖÐrubyµÄ¹ý³ÌÖÐÄÑÃâ»áÓöµ½Ìá¸ßÐÔÄܵÄÎÊÌ⣬Óɴ˱ãÏëÆðÁËrubyÏ̡߳£µ«ÊÇÎÒÔÚʹÓÃÖÐÈ´·¢ÏÖrubyµÄÏß³ÌÈ´²»ÄÜÌá¸ßÐÔÄÜ¡£ÎÒдÁËÒÔÏ´úÂ룬×öÁËЩ¼òµ¥²âÊÔ¡£
´úÂë
# -*- coding: GB2312 -*-
require 'date'
# ʹÓÃỊ̈߳¬Ï̵߳Ĵ¦Àí´úÂëÀïûÓÐsleep
def have_thread_no_sleep
p Time.now
thread1 = Thread.new do
......

Perl£¬Python£¬Ruby£¬JavascriptËÄÖֽű¾ÓïÑԱȽÏ

ΪÁËÑ¡ÔñÒ»¸öºÏÊʵĽű¾ÓïÑÔѧϰ£¬½ñÌì²éÁ˲»ÉÙÓйØPerl£¬Python£¬Ruby£¬JavascriptµÄ¶«Î÷£¬¿ÉÊÇ·¢ÏÖ¸÷´óÕóÓªµÄÈ˶¼ÔÚ´µÅõ×Ô¼ºÏ²»¶µÄÓïÑÔ£¬²»¹ý×îûÓÐÕùÒéµÄÓ¦¸ÃÊÇJavascriptÏֽ׶λ¹²»ÊʺÏÓÃÀ´×ö¶ÀÁ¢¿ª·¢£¬ËüµÄÌìÏ»¹ÊÇÔÚwebÓ¦ÓÃÉÏ¡£ ÎÒÖ÷ÒªÊÇÏë×öÊý¾ÝÍÚ¾òËã·¨µÄÑо¿£¬Ó¦¸Ã»á´¦Àí´óÁ¿µÄÎı¾¡£Ìáµ½Îı¾´¦Àí£¬ÏàÐŴ󲿷ÖÈË ......

²ËÄñºÍRMXPºÍRubyÓïÑÔ

      ϲ»¶Íæ°¢ÔÂϵÁÐRPGÓÎÏ·µÄÎÒ£¬¸ú²»ÉÙͯЬһÑùÏÂÁËRPGMakerXPÀ´Õ°Ñöһϡ£µ±Ê±¾õµÃÕâ¸öÈí¼þÌ«·½±ãÁË£¬ÓÃÊó±êËæ±ãµãµã¾ÍÄÜŪ³öÀ´¸öÓÐȤµÄСÓÎÏ·¡£ÒòΪÀïÃæ²»½ö×Ô´ø²»ÉÙµØÍ¼ºÍÈËÎïÐÐ×ßͼµÈËØ²Ä£¬ÈÝÒ×ÉÏÊֵIJÙ×÷·½Ê½Ò²ÈÃ×Ô¼º´óÓгɾ͸Ѕ…¿ÉÊÇÓÎÏ·±Ï¾¹ÊÇÀë²»¿ª±à³Ì£¬½â¿ªÓÎÏ·°ü£¬¿´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ