ActiveResource Available as a Gem 36

Posted by ryan
at 9:30 AM on Thursday, April 26, 2007

In the past, whenever I’ve spoken to a group about ActiveResource, one of the questions that regularly comes up is if ActiveResource is available as a gem. Trying to install it from the svn tree is a little less than straight forward. With ARes now scheduled to be a part of Rails it will be installable as a gem. For now, though, prior to the official Rails release you can get ARes installed with:

gem install activeresource --source

(Thanks to DHH for pointing this out in my last post)

When Rails is released you will be able to use the more conventional:

gem install activeresource

tags: ruby, rubyonrails, REST


Leave a response

  1. Open WookieApril 26, 2007 @ 12:05 PM


    I’m really looking forward to using this. I’ve got an app that this is perfect for.

  2. OkadaApril 26, 2007 @ 04:52 PM

    Do I have to be using Edge (or any specific version of Rails) on the client side to install ARes? Are there any dependencies on ActiveSupport or everething it needs is installed by the gem?

    Great news. Thanks!

  3. RyanApril 26, 2007 @ 05:59 PM

    Okada – if you’re installing the gems, ActiveResource and ActiveSupport are the only ones you should need to install (and trying a gem install activeresource will automatically pull down the dependencies for you).

    As far as needing to be on edge Rails on the client side – I’m not sure about that. I would guess that since the only potentially conflicting dependency is ActiveSupport you might be in the clear?

  4. Franco SellittoMay 02, 2007 @ 09:19 AM

    Hello everybody

    I’m trying to understand how to work with ActiveResource, but I cannot manage the installation. After gem install activeresource—source I have now the gems activeresource ( activesupport (,, 1.4.1, 1.3.1, 1.3.0, 1.2.5)

    When I try to open the console (./script/console) into my application and then just inspect the ActiveResource, I have an error message: “NameError: uninitialized constant ActiveResource”

    When I try with >> require ‘active_resource’ I have the following error message: “MissingSourceFile: no such file to load—active_resource”

    What I have to include in order to make it run?


  5. Franco SellittoMay 02, 2007 @ 01:01 PM

    I found the problem!

    I was working with a project already started with Rails 1.2.2 then I just updated the gems.

    Now I changed in config/environment.rb: RAILS_GEM_VERSION = ‘1.2.2’ to RAILS_GEM_VERSION = ‘1.2.3’. It seems work now.

  6. Franco SellittoMay 03, 2007 @ 08:14 AM

    Ops, the problem was not completely solved. With 1.2.3 I can start the script/console, but when I start the script/server (or event script/about) I have this error:

    /opt/local/lib/ruby/gems/1.8/gems/activesupport- `alias_method’: undefined method `load_plugin’ for class `Rails::Initializer’ (NameError)

    Rails 1.2.2 with ActiveSupport 1.4.1 works fine, but when I want to have ActiveResource, I need at least 1.2.3 and 1.4.2 that don’t start in proper way.

  7. jack dempseyMay 18, 2007 @ 12:03 PM

    I’ve played around with this some, and am curious if you actually got it working Franco. I’ve installed the beta gem which pulled down activesupport However, when trying to use things inside a rails 1.2.3 app, which ties specifically to activesupport 1.4.2, I get an activation error. Have you (or others) just hacked at things to get it working?

  8. Tyler RickMay 25, 2007 @ 05:16 PM

    Why do I get this error when I try to install it? ERROR: While executing gem … (NoMethodError) undefined method `source_index’ for # /usr/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:81:in `source_index_hash’ /usr/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:80:in `each’ /usr/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:80:in `source_index_hash’ /usr/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:91:in `specs_n_sources_matching’ /usr/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:114:in `find_gem_to_install’ /usr/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:57:in `install’ /usr/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:277:in `execute’ /usr/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:239:in `each’ /usr/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:239:in `execute’ /usr/lib/ruby/site_ruby/1.8/rubygems/command.rb:70:in `invoke’ /usr/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:120:in `process_args’ /usr/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:91:in `run’ /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:30:in `run’ /usr/bin/gem:23

    gem install activeresource --source --backtrace

    (sudo rm /usr/lib/ruby/gems/1.8/source_cache doesn’t help)


  9. David JonesAugust 03, 2007 @ 06:10 PM

    Thanks Ryan.

    I was trying to run my tests and kept getting “no such file to load—active_resource”.

    After running “gem install activeresource—source” the problem was fixed!

  10. Peter JCApril 24, 2009 @ 12:49 AM

    Thanks for the tip. I wasn’t able to build a new rails project due to missing activeresource. Found your blog and fixed it!

  11. Peter JCApril 24, 2009 @ 12:49 AM

    Thanks for the tip. I wasn’t able to build a new rails project due to missing activeresource. Found your blog and fixed it!

  12. The Article BlitzJanuary 19, 2012 @ 04:44 PM

    Its like you learn my thoughts! You appear to understand a lot about this, like you wrote the e book in it or something. I believe that you could do with some percent to pressure the message house a little bit, however instead of that, this is magnificent blog. An excellent read. I’ll definitely be back.

  13. world of opinionJanuary 19, 2012 @ 06:15 PM

    Appreciation to my father who told me on the topic of this blog, this website is in fact awesome.

  14. Davis N JacquezJanuary 28, 2012 @ 12:40 AM

    Thanks to my father who told me concerning this webpage, this web site is genuinely awesome.

  15. eol TZFebruary 11, 2012 @ 11:05 PM

    I read this post completely regarding the comparison of most up-to-date and previous technologies, it’s awesome article.

  16. acaJuly 06, 2012 @ 03:45 PM

    Hello there, I found your web site by the use of Google even as looking for a related matter, your website came up, it appears to be like good. I have bookmarked it in my google bookmarks. I’m no longer certain where you are getting your info, however good topic. I must spend a while finding out more or working out more. Thank you for wonderful information I was in search of this information for my mission.

  17. 19, 2012 @ 09:40 PM

    A person necessarily assist to make significantly posts I might state. This is the first time I frequented your website page and thus far? I surprised with the research you made to create this particular put up incredible. Excellent process!

  18. Jenny R RiggsbyAugust 24, 2012 @ 09:32 AM

    wonderful publish, very informative. I’m wondering why the other experts of this sector do not notice this. You must proceed your writing. I am sure, you have a great readers’ base already!

  19. mma trainingSeptember 17, 2012 @ 10:21 AM

    obviously like your website but you need to test the spelling on several of your posts. Several of them are rife with spelling issues and I in finding it very bothersome to inform the truth however I will certainly come again again.

  20. LiteratureSeptember 20, 2012 @ 08:30 PM

    I’m really impressed with your writing skills and also with the layout on your weblog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it’s rare to see a nice blog like this one nowadays.

  21. Amethyst Lucky GemSeptember 24, 2012 @ 05:22 AM

    Fascinating blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple tweeks would really make my blog shine. Please let me know where you got your design.

    Appreciate it

  22. derecho internacionalSeptember 25, 2012 @ 07:28 PM

    Woah! I’m really loving the template/theme of this site. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between usability and visual appeal. I must say you have done a awesome job with this. Also, the blog loads super quick for me on Safari. Outstanding Blog!

  23. diet plans that workSeptember 25, 2012 @ 08:42 PM

    Good way of explaining, and good paragraph to get data regarding my presentation subject matter, which i am going to convey in institution of higher education.

  24. Recursos De multaSeptember 27, 2012 @ 02:52 AM

    I know this web page presents quality dependent articles and extra information, is there any other site which provides these kinds of information in quality?

  25. societySeptember 27, 2012 @ 10:10 PM

    The main success of the business depends on the user friendly and search engine friendly websites. And now for the secret weapon of the long-awaited, just go to this website simple design and see the video, you will understand why it is a secret weapon that only the guru of use, once you try it. Perhaps they have even come to the conclusion that a web site is not worth the expense. society Your internet site is your method towards a life of clients with your client’s option to you. The way to do this is to hire a company that can design the site so that the right keywords are used as well as the key phrases. Maintain a list for each proposal, consisting of its strengths and weaknesses, and the strengths and weaknesses of the respective Web design firm based on its other materials (Web site, portfolio, brochure, case studies, etc.

  26. SharylSeptember 28, 2012 @ 09:29 PM

    Definitely consider that which you said. Your favorite justification appeared to be on the web the simplest factor to take note of. I say to you, I certainly get annoyed even as people think about worries that they plainly do not recognise about. You controlled to hit the nail upon the top and also outlined out the entire thing without having side effect , people can take a signal. Will likely be again to get more. Thank you

  27. Netflix StreamingSeptember 30, 2012 @ 03:17 AM

    Excellent way of describing, and pleasant article to obtain information about my presentation focus, which i am going to deliver in school.

  28. seo for small businessOctober 01, 2012 @ 03:52 AM

    I am in fact happy to glance at this website posts which contains lots of helpful data, thanks for providing such information.

  29. MireyaOctober 02, 2012 @ 01:50 PM

    Good day! This is kind of off topic but I need some help from an established blog. Is it very difficult to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about setting up my own but I’m not sure where to start. Do you have any ideas or suggestions? Cheers

  30. webseoranks.comOctober 02, 2012 @ 05:46 PM

    I have learn a few excellent stuff here. Certainly price bookmarking for revisiting. I wonder how so much effort you set to create one of these wonderful informative website.

  31. innerspringOctober 04, 2012 @ 06:47 AM

    We are a group of volunteers and opening a brand new scheme in our community. Your site offered us with helpful info to work on. You’ve done an impressive task and our whole group will likely be grateful to you.

  32. ティンバーランド アウトレットOctober 06, 2012 @ 06:25 AM

    What’s up everybody, here every one is sharing these kinds of experience, so it’s nice to read this webpage, and I used to pay a quick visit this webpage everyday.

  33. 5point.infoOctober 09, 2012 @ 12:04 PM

    Howdy would you mind sharing which blog platform you’re working with? I’m looking to start my own blog in the near future but I’m having a difficult time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique. P.S Apologies for getting off-topic but I had to ask!

  34. Warning labels Dietary supplementsOctober 13, 2012 @ 05:58 AM

    Wonderful post! We will be linking to this particularly great content on our website. Keep up the good writing.

  35. MckinleyOctober 18, 2012 @ 03:50 PM

    I comment each time I especially enjoy a article on a website or if I have something to valuable to contribute to the discussion. It’s caused by the fire displayed in the article I browsed. And on this post Ryan’s Scraps: ActiveResource Available as a Gem. I was moved enough to post a thought :-) I actually do have 2 questions for you if you don’t mind. Could it be only me or does it give the impression like some of the responses look like they are written by brain dead people? :-P And, if you are writing on other social sites, I’d like to follow everything fresh you have to post. Would you make a list the complete urls of your community sites like your twitter feed, Facebook page or linkedin profile?

  36. IconCompanions.comOctober 26, 2012 @ 12:14 PM

    Hi there, I found your website by the use of Google at the same time as looking for a related matter, your site came up, it looks good. I’ve bookmarked it in my google bookmarks. Hello there, simply become aware of your weblog through Google, and located that it is truly informative. I’m going to be careful for brussels. I will be grateful should you continue this in future. Numerous other folks might be benefited out of your writing. Cheers!