views:

484

answers:

5

Thank you for taking your time in reading this. I am just getting started with running Watir in Eclipse. When I try to load the require 'firewatir' statement on the top of the page, I receieve this error in the Eclipse console:

in inherited': undefined methoddemodulize' for "FireWatir::Pre":String (NoMethodError)

Running require firewatir in the 'irb' returns the same error. Any help would be greatly appreciated!

System Information: Ruby Version: Ruby 1.9.1p430 Eclipse Version:Eclipse Java EE IDE Build id: 20100218-1602 Watir Version: 1.6.5 FireWatir Version: firewatir 1.6.5

A: 

As far as I know, Watir does not work with Ruby 1.9. Install Ruby 1.8.

Željko Filipin
Zeljko, thank you for your suggestion. I was using Ruby 1.9 and you were correct, it did go over so well. Currently trying the Ruby 1.8 version right now.
Amorsolo Abanes
There are versions of watir that work with ruby 1.9, but I did not want to get you confused.
Željko Filipin
+1  A: 

I solved this by:

gem uninstall activesupport
gem install activesupport --version '=2.3.8'

To allow Watir to run on ruby 1.9.2
install devkit and follow procedures listed here : Ruby Installer at GitHub

gem uninstall win32-api
gem install win32-api --platform=ruby
Cliff
I tried to create an account to open a bug on Jira twice. Found a bug with Jira, I guess. I'll try again later. Thanks for your attention to this in any case!
Cliff
http://jira.openqa.org/browse/WTR-454opened ticket WTR-454 per Charley's request.
Cliff
Cliff, thank you for your reply. Adding require 'active_support'/inflector seem to work with eclipse. I was unaware of the uninstall function in ruby so thank you for pointing me in the right direction!
Amorsolo Abanes
+1  A: 

This appears to be a problem with the latest version of ActiveRecord - 3.0.0. I'd thought that we removed that as a dependency, apparently not. Please file a ticket in Jira and I'll take a look at it.

http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowtocreateaJiraTicket%3F

charley
Charley, thank you for your reply. I'll definitely file a ticket on this matter if it helps.
Amorsolo Abanes
+1  A: 

No need to uninstall activesupport-3.0.0, solved this by specifying required activesupport e.g:

require 'rubygems'    
gem "activesupport","=2.3.8"
require "firewatir"
Tambet Masik
A: 

Cliff's solution above worked for me with Watir 1.6.5, Ruby 1.9.1. I was trying to get get latest version of Watir, 1.6.5, working with any version of Ruby 1.8.7.x to 1.9.1.x and just could not get it working. Cliff's solution was the only thing that worked.

Thanks.

Environment: Windows 7.

ruby -v ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]

gem list

* LOCAL GEMS *

activesupport (2.3.8) builder (2.1.2) commonwatir (1.6.5) firewatir (1.6.5) hoe (2.6.2) json_pure (1.4.6) nokogiri (1.4.3.1 x86-mingw32) rake (0.8.7) rdiscount (1.6.5) rubyforge (2.0.4) s4t-utils (1.0.4) user-choices (1.1.6.1) watir (1.6.5) win32-api (1.4.6 x86-mingw32) win32-process (0.6.2) windows-api (0.4.0) windows-pr (1.0.9) wxruby-ruby19 (2.0.1 x86-mingw32) xml-simple (1.0.12)