I'm experiencing a similar issue with postgres(pg 0.17.1). Here's my
backtrace:
2.1.3 :003 > DB
#<Sequel::Postgres::Database: {:adapter=>"postgres", :host=>"athenadb",
:port=>5432, :encoding=>"utf8", :database=>"athena_dev", :user=>"postgres",
:password=>nil, :max_connections=>10, :loggers=>[#<Logger:0x007faf7b8f9670
@progname=nil, @level=0,
@default_formatter=#<Logger::Formatter:0x007faf7b8f95f8
@datetime_format=nil>, @formatter=nil,
@logdev=#<Logger::LogDevice:0x007faf7b8f9440 @shift_size=nil,
@shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>,
@mutex=#<Logger::LogDevice::LogDeviceMutex:0x007faf7b8f93a0 @mon_owner=nil,
@mon_count=0, @mon_mutex=#<Mutex:0x007faf7b8f9350>>>>]}>
2.1.3 :004 > DB[:accounts]
ArgumentError: wrong number of arguments (0 for 1..2)
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:686:in
`to_hash'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/awesome_print-1.6.1/lib/awesome_print/formatter.rb:67:in
`awesome_self'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/awesome_print-1.6.1/lib/awesome_print/formatter.rb:28:in
`format'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/awesome_print-1.6.1/lib/awesome_print/inspector.rb:137:in
`unnested'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/awesome_print-1.6.1/lib/awesome_print/inspector.rb:104:in
`awesome'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/awesome_print-1.6.1/lib/awesome_print/core_ext/kernel.rb:10:in
`ai'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/awesome_print-1.6.1/lib/awesome_print/core_ext/kernel.rb:20:in
`ap'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/awesome_print-1.6.1/lib/awesome_print/inspector.rb:31:in
`output_value'
from /Users/pwashburn/Development/little_owl/Rakefile:19:in `block in <top
(required)>'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/task.rb:240:in
`call'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/task.rb:240:in
`block in execute'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/task.rb:235:in
`each'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/task.rb:235:in
`execute'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/task.rb:179:in
`block in invoke_with_call_chain'
from
/Users/pwashburn/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
`mon_synchronize'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/task.rb:172:in
`invoke_with_call_chain'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/task.rb:165:in
`invoke'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:150:in
`invoke_task'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:106:in
`block (2 levels) in top_level'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:106:in
`each'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:106:in
`block in top_level'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:115:in
`run_with_threads'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:100:in
`top_level'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:78:in
`block in run'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:176:in
`standard_exception_handling'
from
/Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/lib/rake/application.rb:75:in
`run'
from /Users/pwashburn/.rvm/gems/ruby-2.1.3/gems/rake-10.4.2/bin/rake:33:in
`<top (required)>'
from /Users/pwashburn/.rvm/gems/ruby-2.1.3/bin/rake:23:in `load'
from /Users/pwashburn/.rvm/gems/ruby-2.1.3/bin/rake:23:in `<main>'
from /Users/pwashburn/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in
`eval'
from /Users/pwashburn/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in
`<main>'
On Friday, March 6, 2015 at 2:50:25 PM UTC-5, Lucas Viecelli wrote:
>
> I'm trying to get results of an oracle database, but I can not get the
> expected result, is not possible data from a query.
> My connection:
>
> db = Sequel.oracle('db', :user=>'user', :password=>'pass', :host =>
> "192.168.10.168", :port=> '1521')
>
> Use connection:
> db[:item]
> output error: #<ArgumentError: wrong number of arguments (0 for 1..2)>
>
> or
>
> db['select * from item']
> output error: #<ArgumentError: wrong number of arguments (0 for 1..2)>
>
> the syntax must be correct, use in postgresql and it works!
>
> Oracle settings should not be .. because by ActiveRecord, is possible get
> db records
>
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.