易截截图软件、单文件、免安装、纯绿色、仅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'
 


相关文档:

自动化测试之路(一) ruby初探

从今天起不再浪费时间,开始走向自动化测试这条光明的道路,并以搭建一个自动化测试平台为目标,并这个过程一点点的记录下来和大家分享
首先,是ruby环境的搭建
(1)到ruby的官网:http://www.ruby-lang.org/en/下载 ruby安装程序;
      PS :选择 ruby on windows,我下载的是Ruby 1.8.6 One ......

Ruby 命令行 常用命令

从命令行启动Ruby解释器时,你不仅可以提供程序文件的名字,而且可以提供一个或多个命令行开关。你选择的开关指示解释器以一种特定的方式运转,并且/或者执行特定的操作。
Ruby命令行开关有20多个,其中有些很少使用,有些则每天被很多Ruby程序员使用。在这里我们将再看几个最常用的。(你已经看到过其中的两个,-c和&ndas ......

Perl,Python,Ruby,Javascript四种脚本语言比较

为了选择一个合适的脚本语言学习,今天查了不少有关Perl,Python,Ruby,Javascript的东西,可是发现各大阵营的人都在吹捧自己喜欢的语言,不过最没有争议的应该是Javascript现阶段还不适合用来做独立开发,它的天下还是在web应用上。 我主要是想做数据挖掘算法的研究,应该会处理大量的文本。提到文本处理,相信大部分人 ......

Ruby学习笔记二——数组

#一、数组引用
arr=[3,4,5,6,7,8,9]
puts arr[0] #3
puts arr.first #3
puts arr[arr.length-1] #9
puts arr[arr.size-1] #9
puts arr.last #9
puts arr[-1] #9
puts arr[-2] #8
print arr[1..3] ,"\n" #456
print arr[-3,4] ,"\n" #789,从-3开始 ,打印4个元素,这里只有三个
#Ruby的数组大小是动态的,你能够 ......

Ruby学习笔记三——类


#一、定义一个类
class Person
  def initialize(name,age=18)
    @name=name;
    @age=age;
    @motherland="china";
  end
  def talk
    puts "my name is "+@name+" and I am "+@age.to_s
   &nb ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号