# Update my gems this morning ;(

**URL:** <https://www.ruby-forum.com/t/update-my-gems-this-morning/140083>\
**Category:** Ruby\
**Created:** [June 10, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/update-my-gems-this-morning/140083 "2008-06-10T17:52:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ernsttanaka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/46a35a/32.png) [@ernsttanaka](https://www.ruby-forum.com/u/ernsttanaka)\
**Post date:** [June 10, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/update-my-gems-this-morning/140083/1 "2008-06-10T17:52:38Z")

</div>

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’)

---

<div class="post-metadata">

**Author:** ![ernsttanaka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/46a35a/32.png) [@ernsttanaka](https://www.ruby-forum.com/u/ernsttanaka)\
**Post date:** [June 10, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/update-my-gems-this-morning/140083/2 "2008-06-10T19:30:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ernsttanaka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/46a35a/32.png) [@ernsttanaka](https://www.ruby-forum.com/u/ernsttanaka)\
**Post date:** [June 10, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/update-my-gems-this-morning/140083/3 "2008-06-10T20:14:20Z")

</div>

On Jun 10, 2008, at 10:29 AM, Ernst T. wrote:

> 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’
