Hi Yehang -
Ruby comes with many standard libraries ("gems"), but the library for
connecting to a Riak cluster is not one of them. That's what the "gem
install riak-client" did - fetched and installed the library that
provides the ability to connect to and interact with a Riak cluster.
More info here: http://guides.rubygems.org/
--
Luke Bakken
CSE
[email protected]
On Thu, Feb 20, 2014 at 7:29 AM, 韩业航 <[email protected]> wrote:
> thank you very much, it works! can you tell me the reason for this?
>
>
> On Thu, Feb 20, 2014 at 10:23 AM, Luke Bakken <[email protected]> wrote:
>>
>> Hello Yehang,
>>
>> Exit IRB and run this command:
>>
>> gem install riak-client
>>
>> When you re-run IRB "require riak" should work.
>> --
>> Luke Bakken
>> CSE
>> [email protected]
>>
>>
>> On Thu, Feb 20, 2014 at 7:19 AM, 韩业航 <[email protected]> wrote:
>> > Dear all,
>> > I have install Riak under ubuntu 12.04 and set up a local Riak
>> > cluster
>> > which has five nodes. I want use ruby to populate a script.
>> > i install all the requirements of ruby and type IRB in the terminal,it
>> > works.but when i type require 'riak'. I got the following result:
>> >
>> > LoadError: cannot load such file -- riak
>> > from
>> >
>> > /home/yehang/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
>> > `require'
>> > from
>> >
>> > /home/yehang/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
>> > `require'
>> > from (irb):3
>> > from /home/yehang/.rvm/rubies/ruby-2.1.0/bin/irb:11:in `<main>'
>> > Can anyone give some advice? I am a beginner. Thanks in advance!
>> >
>> > sincerely
>> > yehang
>> >
>> > _______________________________________________
>> > riak-users mailing list
>> > [email protected]
>> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> >
>
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com