update my gems this morning ;(

E

Ernst Tanaka

I seem to regret updating my gems this morning.
I had to, because I was running behind in fxruby.
But now I am getting the following error.
Tried to roll back some update but no result so far.
I can do with a hand.

I appreciate all the help on this forum

Ernst

This the error;
-------------------------
C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:49:in `activate': wrong
number of arguments (1 for 2) (ArgumentError)

from C:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:49:in `gem'

from
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:226:in
`establish_connection'

from C:/rubydev/ch06/monitor/trade.rb:14
-----------------------
This is line 14:

ActiveRecord::Base.establish_connection(
:adapter => 'mysql',
:database => 'monitor_production',
:username => 'root',
:password =>'*****',
:host => 'localhost')
______________________________

Here is the list of my current gem versions.
actionmailer (2.1.0, 2.0.1, 1.3.3)
actionpack (2.1.0, 2.0.1, 1.13.6, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
activerecord (2.1.0, 1.15.3)
activeresource (2.1.0)
activesupport (2.1.0, 1.4.4, 1.4.2)
ajax_scaffold (1.0.0)
builder (2.1.2)
fxri (0.3.6)
fxruby (1.6.15, 1.6.13, 1.6.6)
hoe (1.5.3, 1.3.0)
hpricot (0.6, 0.5, 0.4)
inspectorgadget (0.0.1)
linecache (0.42)
log4r (1.0.5)
mechanize (0.7.6, 0.6.10)
mysql (2.7.3)
ParseTree (2.2.0, 2.0.2, 1.7.1)
ParseTreeReloaded (0.0.1)
rails (2.1.0, 1.2.3)
rake (0.8.1, 0.7.3)
ruby-debug-base (0.10.1, 0.10.0, 0.9.3)
ruby-debug-ide (0.1.10, 0.1.9)
ruby2ruby (1.1.9, 1.1.6)
rubyclr (0.5.2)
rubyforge (1.0.0, 0.4.4)
rubygems-update (1.1.1)
RubyInline (3.6.3)
RubyInlineAcceleration (0.0.1)
scrubyt (0.3.4)
sources (0.0.1)
sqldsl (1.4.6)
text-format (1.0.0)
text-hyphen (1.0.0)
win32-api (1.0.6)
win32-clipboard (0.4.3, 0.4.1)
win32-dir (0.3.2, 0.3.1)
win32-eventlog (0.4.8, 0.4.3)
win32-file (0.5.5, 0.5.3)
win32-file-stat (1.2.7, 1.2.3)
win32-process (0.5.8, 0.5.1, 0.5.0)
win32-sapi (0.1.4, 0.1.3)
win32-sound (0.4.1, 0.4.0)
windows-api (0.2.3)
windows-pr (0.8.5, 0.6.2)
yahoo-finance (0.0.2)

-------------- line 1 to 13 ---------
require 'fox16'
include Fox
require 'tk'
require 'rubygems'
require 'active_record'
require 'date'
require 'monitor_schema' #database schema
require 'trademonitor' #mainwindow
require 'scrubyt'
extend Tk
extend TkWinDDE
ActiveRecord::Base.logger = Logger.new('c:/sqllog.txt')
 
E

Ernst Tanaka

I found the solution.
I like Ruby on most days.
But sometimes it surprises me.
Like today.

The solution was changing the order of the require statements :(

The old order worked for months!!!


If someone could comment, that would be appreciated.

Thks
Ernst


---- the working order is ----
require 'tk'
require 'active_record'
require 'rubygems'
require 'date'
ActiveRecord::Base.logger = Logger.new('c:/sqllog.txt')
ActiveRecord::Base.establish_connection(
:adapter => 'mysql',
:database => 'monitor_production',
:username => 'root',
:password =>'*****',
:host => 'localhost')
require 'fox16'
include Fox
require 'monitor_schema' #database schema
require 'trademonitor' #mainwindow
require 'scrubyt'
extend Tk
extend TkWinDD
 
E

Eric Hodel

I found the solution.
I like Ruby on most days.
But sometimes it surprises me.
Like today.

The solution was changing the order of the require statements :(

The old order worked for months!!!


If someone could comment, that would be appreciated.

Thks
Ernst


---- the working order is ----
require 'active_record'
require 'rubygems'

Likely you upgraded to an API-incompatible version of activerecord.

`gem list activerecord` will show you which versions you have
installed. You could either uninstall the offending version, or do
this:

require 'rubygems'

gem 'activerecord', 'second-oldest-version-you-have-in-your-list'

require 'active_record'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top