in my console,
laptop:~$ svn checkout svn://rubyforge.org/var/svn/ib-ruby
A ib-ruby/trunk
A ib-ruby/trunk/datatypes.rb
A ib-ruby/trunk/LICENSE
require 'rubygems'
=> true
irb(main):003:0> require 'ib'
LoadError: no such file to load -- ib
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):3
from :0
what's wrong?
in my console,
laptop:~$ svn checkout svn://rubyforge.org/var/svn/ib-ruby
A ib-ruby/trunk
A ib-ruby/trunk/datatypes.rb
A ib-ruby/trunk/LICENSE
require 'rubygems'
=> true
irb(main):003:0> require 'ib'
LoadError: no such file to load -- ib
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):3
from :0
what's wrong?
Hi,
Don't Know but check this if it may help you for install ibruby gem,
in my console,
laptop:~$ svn checkout svn://rubyforge.org/var/svn/ib-ruby
A ib-ruby/trunk
A ib-ruby/trunk/datatypes.rb
A ib-ruby/trunk/LICENSE
require 'rubygems'
=> true
irb(main):003:0> require 'ib'
LoadError: no such file to load -- ib
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (irb):3
from :0
what's wrong?
The library doesn't have a file called ib.rb, and/or the library's lib
directory is not in your $LOAD_PATH.
irb -I ib-ruby/trunk
irb(main):001:0> $:.unshift 'ib-ruby/trunk'
irb(main):002:0> require 'ib'
=> true
irb(main):005:0> ib = IB::IB.new()
=> #<IB::IB:0xb7638e10
@listeners={IB::IncomingMessages::NextValidID=>[#<Proc:0xb76c30c4@./ib-ruby/trunk/ib.rb:119>]},
@server={:remote_connect_time=>"20100914 08:07:10 EST", :client_id=> ,
:socket=>#<IB::IBSocket: >, :reader_thread=>#<Thread:0xb7638820 sleep>,
:local_connect_time=>Tue Sep 14 20:07:13 -0400 2010, :version=>49},
@next_order_id=nil, @options={:ip=>"127.0.0.1", :port=>"7496"},
@connected=true>
irb(main):006:0>
i have read :http://ib-ruby.rubyforge.org/
still don't know how to use it
for example, if i want to get the stock yhoo(yahoo) qoute from 2010-1-1
till 2010-9-1
date,open,high,low,close,vol
would you mind to tell me to do it?
any advice appreciated.
when i close my irb,re-open it
irb(main):005:0> quit
pt@pt-laptop:~$ irb
irb(main):001:0> require 'ib'
LoadError: no such file to load -- ib
from (irb):1:in `require'
from (irb):1
irb(main):002:0>
i don't want to input $:.unshift 'ib-ruby/trunk' everytime when i
want to use it,how to solve it ?
there is file in "/home/pt/ib-ruby/trunk/ib.rb"
pt@pt-laptop:~$ irb
irb(main):001:0> require "/home/pt/ib-ruby/trunk/ib.rb"
LoadError: no such file to load -- messages
from /home/pt/ib-ruby/trunk/ib.rb:26:in `require'
from /home/pt/ib-ruby/trunk/ib.rb:26
from (irb):1:in `require'
from (irb):1
irb(main):002:0>
why i can't require it ?
i don't want to input $:.unshift 'ib-ruby/trunk' everytime when i
want to use it,how to solve it ?
option 1: start your session with
irb -Iib-ruby/trunk
option 2: put the $:.unshift 'ib-ruby/trunk' into a file called boot.rb,
then you just do require 'boot' before require 'ib'
option 3: install the ib gem (and then require 'rubygems'; require 'ib')
option 4: put the session setup into ~/.irbrc [not recommended, you
don't want all your sessions to have this]
option 5: copy all the ib code into the current directory [messy]
If you are building an application, I would be inclined to make a
vendor/ subdirectory and install ib under that, and have a boot.rb which
adds it to $:. Your app just needs require 'boot' at the top.
there is file in "/home/pt/ib-ruby/trunk/ib.rb"
pt@pt-laptop:~$ irb
irb(main):001:0> require "/home/pt/ib-ruby/trunk/ib.rb"
LoadError: no such file to load -- messages
from /home/pt/ib-ruby/trunk/ib.rb:26:in `require'
from /home/pt/ib-ruby/trunk/ib.rb:26
from (irb):1:in `require'
from (irb):1
from :0
irb(main):002:0>
why i can't require it ?