Was able to fix this by first doing: sudo port install libffi

Once that was installed I was able to do:

gem install  selenium-webdriver
gem install watir-webdriver --pre

However when I try to run my scripts I get the following error:

/opt/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.7/lib/watir/
exceptions.rb:12: superclass mismatch for class UnknownObjectException
(TypeError)
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
        from /opt/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.7/lib/
safariwatir.rb:1
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
        from /Users/employee/watir_site_regression/
spec_helper_site_regression.rb:3
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
        from ./specs/login_and_registration_spec.rb:1
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:15:in `load'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:15:in `load_files'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:14:in `each'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:14:in `load_files'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
options.rb:107:in `run_examples'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
command_line.rb:9:in `run'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/bin/spec:4
        from /opt/local/bin/spec:19:in `load'
        from /opt/local/bin/spec:19

I comment out safariwatir in my require section and rerun my tests and
get:

/opt/local/lib/ruby/gems/1.8/gems/commonwatir-1.6.5/lib/watir/
exceptions.rb:12: superclass mismatch for class UnknownObjectException
(TypeError)
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
        from /opt/local/lib/ruby/gems/1.8/gems/commonwatir-1.6.5/lib/watir/
waiter.rb:1
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
        from /opt/local/lib/ruby/gems/1.8/gems/commonwatir-1.6.5/lib/watir.rb:
5
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
        from /Users/employee/watir_site_regression/
spec_helper_site_regression.rb:4
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
        from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
        from ./specs/login_and_registration_spec.rb:1
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:15:in `load'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:15:in `load_files'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:14:in `each'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:14:in `load_files'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
options.rb:107:in `run_examples'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
command_line.rb:9:in `run'
        from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/bin/spec:4
        from /opt/local/bin/spec:19:in `load'
        from /opt/local/bin/spec:19

Anyone know what might be causing the and how to fix?

Thanks.

On Jan 28, 4:48 pm, QAguy <qablogm...@gmail.com> wrote:
> As a work around for this I'm trying to install the webdriver watir
> gem. But I am having an issue installing it (See below):
>
> host73:~ employee$ sudo gem install selenium-webdriver --no-ri --no-
> rdoc
> Building native extensions.  This could take a while...
> ERROR:  Error installing selenium-webdriver:
>         ERROR: Failed to build gem native extension.
>
> /opt/local/bin/ruby extconf.rb
> checking for ffi.h in /usr/local/include,/opt/local/include... no
> checking for ffi_call() in -lffi... yes
> checking for ffi_prep_closure()... yes
> checking for ffi_raw_call()... no
> checking for rb_thread_blocking_region()... no
> creating extconf.h
> creating Makefile
>
> make
> /usr/bin/gcc-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I. -
> DRUBY_EXTCONF_H=\"extconf.h\" -I/opt/local/include -D_XOPEN_SOURCE -
> D_DARWIN_C_SOURCE  -I/opt/local/include -fno-common -O2 -arch x86_64  -
> fno-common -pipe -fno-common  -Werror -Wunused -Wformat -Wimplicit -
> Wreturn-type  -arch x86_64 -c AbstractMemory.c
> In file included from AbstractMemory.h:37,
>                  from AbstractMemory.c:36:
> Types.h:74:17: error: ffi.h: No such file or directory
> In file included from Types.h:75,
>                  from AbstractMemory.h:37,
>                  from AbstractMemory.c:36:
> Type.h:44: error: expected specifier-qualifier-list before ‘ffi_type’
> In file included from AbstractMemory.c:38:
> Function.h:52: error: expected specifier-qualifier-list before
> ‘ffi_type’
> make: *** [AbstractMemory.o] Error 1
>
> Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/
> ffi-0.5.4 for inspection.
>
> Anyone seen this before on install?
>
> Thanks again.
>
> On Jan 28, 4:28 pm, QAguy <qablogm...@gmail.com> wrote:
>
> > Can't seem to find it.
>
> > Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Reply via email to