May07

We all know, Action Web Service (aws) no longer included in Rails 2, this makes me little bit frustation to integrate latest aws (1.2.6) to rails 2, that gems always make rails broken and raise error like this when we start the server

/usr/lib/ruby/gems/1.8/rubygems.rb:142:in `activate’: can’t activate actionpack (= 1.13.6, runtime), already activated actionpack-2.2.2 (Gem::Exception)

However, how fortunate me, Achmad Gozali, friend of mine in id-ruby suggested to used this modified aws in github and finally after i tried, my installation was succeed, so here the step

add github to your gem sources

gem sources -a http://gems.github.com/

install datanoise-actionwebservice gems, i use rails 2.2.2, so i should install datanoise-actionwebservice version 2.2.2 as well

gem install datanoise-actionwebservice -v=’2.2.2′

add this line to your config/environtment.rb (inside “Rails::Initializer.run do |config|” block)

config.gem ‘datanoise-actionwebservice’, :lib => ‘actionwebservice’, :version => ‘2.2.2′

try to start your web server, if it isn’t broken, that means your gems was successfully installed

ruby script/start

also you can make the basic code through generation

[aditya@aditya trunk]$ ruby script/generate web_service blabla
exists app/services/
exists app/controllers/
exists test/functional/
create app/services/blabla_api.rb
create app/controllers/blabla_controller.rb
create test/functional/blabla_api_test.rb

credit : thanks to Datanoise guys out there and Achmad Gozali of id-ruby to make this happen

1 Comment

Trackback: Use this URI to trackback this entry. Use your web browser's function to copy it to your blog posting.

Gravatar: You can have a picture at the top of each your comments by getting a Gravatar

Eric
June 2, 2009 10:22 pm

Thanks for this post, helped me get action web service running on rails 2.x

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.