views:

1074

answers:

2

Hi all, I had to rebuild my box and I currently am unable to install Watir.

gem install watir
ERROR: Error installing watir:
activesupport requires Ruby version >= 1.8.7.

Which would be fine if Watir was able to use Ruby 1.8.7 . I am using

ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
gem -v
1.3.7

I am not sure when this started to occur, but the documentation on the site is lacking.

+3  A: 

On Windows XP (Professional, Version 2002, Service Pack 3, fully pathched) I have installed ruby186-26.exe from RubyForge, as suggested at watir.com/installation.

C:\>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\>gem env
RubyGems Environment:
  - VERSION: 0.9.4 (0.9.4)
  - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8
  - GEM PATH:
     - c:/ruby/lib/ruby/gems/1.8
  - REMOTE SOURCES:
     - http://gems.rubyforge.org

Automatic RubyGems update did not work:

C:\>gem update --system
Updating RubyGems...
ERROR:  While executing gem ... (Gem::RemoteSourceException)
    HTTP Response 302

I have downloaded rubygems-update-1.3.7.gem from RubyForge, copied it to the folder where I have command prompt open (C:\ in this example) and installed:

C:\>gem install rubygems-update-1.3.7.gem
Successfully installed rubygems-update, version 1.3.7
Installing ri documentation for rubygems-update-1.3.7...
Installing RDoc documentation for rubygems-update-1.3.7...
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README

C:\>update_rubygems
RubyGems 1.3.7 installed
...

To make sure I have the latest RubyGems:

C:\>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
  - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: c:/ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: c:/ruby/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mswin32-60
  - GEM PATHS:
     - c:/ruby/lib/ruby/gems/1.8
     - C:/Documents and Settings/Administrator/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

Now Watir did not want to install:

C:\>gem install watir
ERROR:  Error installing watir:
        activesupport requires Ruby version >= 1.8.7.

I have installed activesupport-2.3.8 as suggested by Charley Baker, and I was able to install Watir:

C:\>gem install activesupport --version="2.3.8"
Successfully installed activesupport-2.3.8
1 gem installed
Installing ri documentation for activesupport-2.3.8...
Installing RDoc documentation for activesupport-2.3.8...

C:\>gem install watir
Successfully installed firewatir-1.6.5
Successfully installed nokogiri-1.4.3.1-x86-mswin32
Successfully installed watir-1.6.5
3 gems installed
...
Željko Filipin
Download the Rubygems from the web instead of from the Ruby way. Also how does this help with watir?
Woot4Moo
Sorry, I have saved the answer when in the middle of investigation, I did not want to lose it if my browser crashed (or something). I have updated the answer with the solution.
Željko Filipin
all that for the real fix: $ gem install activesupport --version="2.3.8"
rogerdpack
rogerdpack I believe you may be the only person in the whole of I.T. that is complaining about too much detail
Woot4Moo
@rogerdpack: well activesupport was not the only problem here, automatic rubygems update did not work too
Željko Filipin
A: 

When I did this. At the update_rubygems step I got this error message.

C:\ruby>update_rubygems ERROR: While executing gem ... (Errno::EACCES) Permission denied - c:/ruby/bin/gem_server.bat

After setting this I was able to successfully do "update_rubgems" C:\ruby>set HOMEDRIVE=C:

C:\ruby>gem install watir ERROR: While executing gem ... (Zlib::BufError) buffer error

and now I am stuck anythoughts?

ivan
please do not mark this in the answer section. Either move it to a comment or give it its own unique question with a link to this one stating that you tried to do this.
Woot4Moo
Is this an answer? It looks like a question to me.
Željko Filipin