# Upgrade and Action Web Service

**URL:** <https://www.ruby-forum.com/t/upgrade-and-action-web-service/137456>\
**Category:** Rails\
**Created:** [May 13, 2008, 10:10am UTC](https://www.ruby-forum.com/t/upgrade-and-action-web-service/137456 "2008-05-13T10:10:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@amanda](https://www.ruby-forum.com/u/amanda)\
**Post date:** [May 13, 2008, 10:10am UTC](https://www.ruby-forum.com/t/upgrade-and-action-web-service/137456/1 "2008-05-13T10:10:32Z")

</div>

I inherited a rails membership database that was basically working,  
though it came with no documentation.

For context: the database manages members of a CSA (community  
supported agriculture) organization. So there is a lot specialized  
stuff like multiple waiting lists and volunteer hours to keep track of  
and invoices to generate. The whole thing was built by a volunteer who  
is long gone, or mostly gone. He definitely doesn’t have time to teach  
me rails. He turned over the database and I tried to get it going on  
Dreamhost, but … nope.

First off, it won’t launch:  
`
[0 chcsa@karnov ourCSA]$ ./public/dispatch.fcgi
/usr/local/lib/site_ruby/1.8/rubygems.rb:317:in activate': can't activate actionpack (= 1.13.6), already activated actionpack-2.0.2] (Gem::Exception) from /usr/local/lib/site_ruby/1.8/rubygems.rb:335:in activate’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:334:in each' from /usr/local/lib/site_ruby/1.8/rubygems.rb:334:in activate’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
31:in require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in require’
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in require’
from ./public/…/config/environment.rb:55
from public/dispatch.fcgi:21:in `require’
from public/dispatch.fcgi:21
`

Some searching around suggests to me that the problem is connected to  
(maybe?) a change in Rails versions. I’m looking at this:

> **[钛刻专家——官网](https://www.texperts.com/2007/12/21/using-action-web-service-with-rails-20/)**
>
> 钛刻专家致力于打造一个全球专家在线服务平台，为机构和个人对接高水平行业专家，为机构提供更系统性的线下定制专家服务。

And thinking that I might be jumping to conclusions, though line 55 of  
environment.rb does say …

55 require ‘action\_web\_service’

Any caveats or suggestions? Is there a better way to approach this?

---

<div class="post-metadata">

**Author:** ![amanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@amanda](https://www.ruby-forum.com/u/amanda)\
**Post date:** [May 13, 2008, 10:26am UTC](https://www.ruby-forum.com/t/upgrade-and-action-web-service/137456/2 "2008-05-13T10:26:37Z")

</div>

> Some searching around suggests to me that the problem is connected to  
> (maybe?) a change in Rails versions. I’m looking at this:  
> [钛刻专家——官网](http://www.texperts.com/2007/12/21/using-action-web-service-with-rails-20/)

I wrote that. The basic problem is that actionwebservice was removed  
from rails 2. It sounds like the app starts off loading rails 2, then  
tries to load actionwebservice but can only find a 1.2.6 gem, which in  
turn depends on activesupport from rails 1.2.6 which can’t be loaded  
because the one from rails 2.0.2 is already loaded.

If the app was previously running 1.2.6, then the easiest thing to do  
would be to get it running under 1.2.6 before you start worrying about  
migrating it to rails 2. (you can specify which gem version to load in  
environment.rb, assuming rails isn’t frozen into vendor/rails.

Fred

---

<div class="post-metadata">

**Author:** ![amanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@amanda](https://www.ruby-forum.com/u/amanda)\
**Post date:** [May 14, 2008, 1:25am UTC](https://www.ruby-forum.com/t/upgrade-and-action-web-service/137456/3 "2008-05-14T01:25:26Z")

</div>

Thanks, Fred.

I’m on Dreamhost. From my read of comments at:

[http://blog.dreamhosters.com/2008/01/06/ruby-on-rails-upgraded-to-202/](http://blog.dreamhosters.com/2008/01/06/ruby-on-rails-upgraded-to-202/)

It sounds like I could manually edit my environment.rb to force an  
older rails version, but I’m not sure how. This helpful page:  
[http://wiki.rubyonrails.org/rails/pages/GemRails](http://wiki.rubyonrails.org/rails/pages/GemRails) describes how to  
force individual gems versions.

(In case you haven’t pieced it together, I have a related issue which  
is that I’m missing any call to Rails::Initializer in this app)

Ignore this for now. Or don’t. I have a basic app, the output of  
“rails myapp” and I can see where it does have those lines:

./myapp/config/boot.rb: defined? Rails::Initializer  
./myapp/config/boot.rb: Rails::Initializer.run(:set\_load\_path)  
./myapp/config/environment.rb:Rails::Initializer.run do |config|

On May 13, 4:25 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![amanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@amanda](https://www.ruby-forum.com/u/amanda)\
**Post date:** [May 14, 2008, 1:28am UTC](https://www.ruby-forum.com/t/upgrade-and-action-web-service/137456/4 "2008-05-14T01:28:58Z")

</div>

By the way, your explanation of this is crystal clear and I really  
appreciate your taking the time to get me even this far. Thanks!

On May 13, 4:25 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![amanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@amanda](https://www.ruby-forum.com/u/amanda)\
**Post date:** [May 14, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/upgrade-and-action-web-service/137456/5 "2008-05-14T14:15:08Z")

</div>

On 14 May 2008, at 00:25, Amanda wrote:

> force individual gems versions.

That page is a zillion years old. The way you do this these days is  
that environment.rb should have something like

RAILS\_GEM\_VERSION = ‘2.0.2’ unless defined? RAILS\_GEM\_VERSION  
in it. Replace 2.0.2 with the desired version.

> (In case you haven’t pieced it together, I have a related issue which  
> is that I’m missing any call to Rails::Initializer in this app)
> 
> Ignore this for now. Or don’t. I have a basic app, the output of  
> “rails myapp” and I can see where it does have those lines:
> 
> ./myapp/config/boot.rb: defined? Rails::Initializer  
> ./myapp/config/boot.rb: Rails::Initializer.run(:set\_load\_path)  
> ./myapp/config/environment.rb:Rails::Initializer.run do |config|

Is the app you’re working on really really old? (ie from before  
Rails::Initializer & friends were created)

Fred

---

<div class="post-metadata">

**Author:** ![amanda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/67e7ee/32.png) [@amanda](https://www.ruby-forum.com/u/amanda)\
**Post date:** [May 14, 2008, 2:28pm UTC](https://www.ruby-forum.com/t/upgrade-and-action-web-service/137456/6 "2008-05-14T14:28:59Z")

</div>

Really old? well, if January was a zillion years ago, I’d say this app  
is paloelithic, yes.

On May 14, 8:14 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
