Upgrade and Action Web Service

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 [email protected] 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:inactivate’
from /usr/local/lib/site_ruby/1.8/rubygems.rb:334:in each' from /usr/local/lib/site_ruby/1.8/rubygems.rb:334:inactivate’
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:inrequire’
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:inrequire’
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:
http://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?

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

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/

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 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. [email protected]

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. [email protected]

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

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. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs