# Older rails apps fail after gem update

**URL:** <https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924>\
**Category:** Rails\
**Created:** [March 15, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924 "2007-03-15T17:21:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 15, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924/1 "2007-03-15T17:21:54Z")

</div>

i just upgraded gems to 0.9.2

after restarting the server, all of the previous apps break. checking  
the logs reveals this for every actions:

ArgumentError (wrong number of arguments (1 for 0)):  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/vendor/mysql.rb:551:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/vendor/mysql.rb:551:in`new’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/vendor/mysql.rb:551:in `scramble41' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/vendor/mysql.rb:141:in`real\_connect’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/connection\_adapters/mysql\_adapter.rb:331:in `connect' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/connection_adapters/mysql_adapter.rb:88:in`initialize’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/connection\_adapters/mysql\_adapter.rb:37:in `new' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/connection_adapters/mysql_adapter.rb:37:in`mysql\_connection’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/connection\_adapters/abstract/connection\_specification.rb:  
251:in `send' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/connection_adapters/abstract/connection_specification.rb: 251:in`connection\_without\_query\_cache=’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/query\_cache.rb:54:in `connection=' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/connection_adapters/abstract/connection_specification.rb: 220:in`retrieve\_connection’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/connection\_adapters/abstract/connection\_specification.rb:  
78:in `connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/base.rb:1046:in`add\_limit!’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/base.rb:1017:in `construct_finder_sql' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/base.rb:924:in`find\_every’  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
active\_record/base.rb:918:in `find_initial' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/base.rb:380:in`find’  
/app/controllers/pages\_controller.rb:4:in `index' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/base.rb:910:in`send’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/  
action\_controller/base.rb:910:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/filters.rb:368:in`perform\_action\_without\_benchmark’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/  
action\_controller/benchmarking.rb:69:in  
`perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in`measure’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/  
action\_controller/benchmarking.rb:69:in  
`perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/rescue.rb:82:in`perform\_action’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/  
action\_controller/base.rb:381:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/base.rb:381:in`process\_without\_filters’  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/  
action\_controller/filters.rb:377:in  
`process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ action_controller/session_management.rb:117:in`process’  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:  
38:in `dispatch’  
dispatch.cgi:10

any ideas? i’m having a panic attack right now trying to figure out  
what’s going on so any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 15, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924/2 "2007-03-15T17:50:57Z")

</div>

Hi –

On 3/15/07, Josh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i just upgraded gems to 0.9.2
> 
> after restarting the server, all of the previous apps break. checking  
> the logs reveals this for every actions:
> 
> ArgumentError (wrong number of arguments (1 for 0)):  
> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/  
> active\_record/vendor/mysql.rb:551:in `initialize’

Are you using Ruby 1.8.6? There was a change that broke Rails…  
namely, a change in the behavior of Digest::SHA1.new. I got this  
error on line 566, I think, but I suspect it’s related.

If you upgrade your Rails gems to 1.2.3 it should be OK (if my  
diagnosis is right).

David

–  
Q. What is THE Ruby book for Rails developers?  
A. RUBY FOR RAILS by David A. Black ([http://www.manning.com/black](http://www.manning.com/black))  
(See what readers are saying! [http://www.rubypal.com/r4rrevs.pdf](http://www.rubypal.com/r4rrevs.pdf))  
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?  
A. Ruby Power and Light, LLC ([http://www.rubypal.com](http://www.rubypal.com))

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 15, 2007, 5:52pm UTC](https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924/3 "2007-03-15T17:52:57Z")

</div>

On 3/15/07, David A. Black [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > ```
> > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/
> > 
> > ```
> > 
> > active\_record/vendor/mysql.rb:551:in `initialize’
> 
> Are you using Ruby 1.8.6? There was a change that broke Rails…  
> namely, a change in the behavior of Digest::SHA1.new. I got this  
> error on line 566, I think, but I suspect it’s related.

In fact I’m virtually sure of it – the line # difference can be  
explained by different AR versions.

David

–  
Q. What is THE Ruby book for Rails developers?  
A. RUBY FOR RAILS by David A. Black ([http://www.manning.com/black](http://www.manning.com/black))  
(See what readers are saying! [http://www.rubypal.com/r4rrevs.pdf](http://www.rubypal.com/r4rrevs.pdf))  
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?  
A. Ruby Power and Light, LLC ([http://www.rubypal.com](http://www.rubypal.com))

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 15, 2007, 5:56pm UTC](https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924/4 "2007-03-15T17:56:57Z")

</div>

Thanks for the reply david.

Unfortunately i am still having problems. my host did update ruby to  
1.8.6 last night, right now, i just want to get my older apps back up.  
should i ask him to rollback the ruby version?

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 15, 2007, 6:17pm UTC](https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924/5 "2007-03-15T18:17:00Z")

</div>

Hi –

On 3/15/07, Josh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks for the reply david.
> 
> Unfortunately i am still having problems. my host did update ruby to  
> 1.8.6 last night, right now, i just want to get my older apps back up.  
> should i ask him to rollback the ruby version?

Yes, or freeze your applications to Rails edge or 1.2.3. 1.8.6  
definitely broke Rails as it stood at the 1.2.2 release.

David

–  
Q. What is THE Ruby book for Rails developers?  
A. RUBY FOR RAILS by David A. Black ([http://www.manning.com/black](http://www.manning.com/black))  
(See what readers are saying! [http://www.rubypal.com/r4rrevs.pdf](http://www.rubypal.com/r4rrevs.pdf))  
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?  
A. Ruby Power and Light, LLC ([http://www.rubypal.com](http://www.rubypal.com))

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 18, 2007, 4:47pm UTC](https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924/6 "2007-03-18T16:47:09Z")

</div>

I had the same problem, that’s what I did:  
1: I deleted the directory of the relevant rails app on my hosts server  
(of course backup any important stuff you don’t have offline)  
2: via ssh I created a new fresh version on the host-server (you of  
course need ssh access, but just ask your host)  
3: I uploaded all relevant files/directories over the fresh rails app.  
That was the whole “app” directory some stuff in the “public” directory,  
namely stylesheets and images (and deleting index.html) database.yml,  
the “db” directory, routes.db (if you use them) and set the environment  
to production by uncommenting the line in environment.rb .  
You probably have to upload other stuff depending on what you used and  
changed.  
I’m sure there is an easier way to achieve this, by only keeping the  
files that’s needed but I couldn’t pinpoint all those files yet.  
Hope that helps

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 15, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/older-rails-apps-fail-after-gem-update/88924/7 "2007-03-15T18:45:04Z")

</div>

did something change with the routing in the new version of rails?

after freezing rails to the app, nothing works that isn’t on the first  
page.
