Is there a way to install an earlier version of watir-webdriver including dependencies?
I've been running watir-webdriver for a while now, but just ran into problems today when installing on a new Windows environment.
The error is on the require "watir-webdriver". The first error line indicates that ruby is unable to load ffi
C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- ffi_c (LoadError)
It looks like the problem may be with the combination of gems, so am including the versions here:
bigdecimal (1.2.4)
childprocess (0.5.3)
ffi (1.9.5 x86-mingw32)
io-console (0.4.2)
json (1.8.1)
minitest (4.7.5)
multi_json (1.10.1)
psych (2.0.5)
rake (10.1.0)
rdoc (4.1.0)
rubyzip (1.1.6)
selenium-webdriver (2.43.0)
test-unit (2.1.3.0)
watir-webdriver (0.6.11, 0.6.10)
websocket (1.2.1)
If you know of a version that worked in the past, you can simple remove the current version and install an old one with the -v flag for gem install.
For example,
gem uninstall watir-webdriver
gem install watir-webdriver -v '= 0.4.0'
You can find the different available version on rubygems.org It will automatically install the proper dependencies.
Related
I have Ruby 2.2.2, I have already watir-webdriver gem installed, when I run following script
require 'rubygems'
require 'watir-webdriver'
browser = Watir::Browser.new :firefox
It gives in
`require': cannot load such file -- watir-webdriver(LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
I have rubymine 7.1.2
Here is my gem list
$ gem list
* LOCAL GEMS *
bigdecimal (1.2.6)
bundler (1.10.3)
bundler-unload (1.0.2)
childprocess (0.5.6)
executable-hooks (1.3.2)
ffi (1.9.8)
gem-wrappers (1.2.7)
io-console (0.4.3)
json (1.8.1)
multi_json (1.11.1)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
rubygems-bundler (1.4.4)
rubyzip (1.1.7)
rvm (1.11.3.9)
selenium-webdriver (2.46.2)
watir-webdriver (0.7.0)
websocket (1.2.2)
yard (0.8.7.6)
Please suggest what to do?
/System/Library/Frameworks/Ruby.framework/Versions/2.0/... is the system library in OS X Yosemite.
Ruby 2.2 (or any other version) is installed by you or some other user -- perhaps via RVM, given you have some rvm gem installed? If so you need to use RVM to change the default. If you did not install RVM correctly or ignored some warning or command it gave to you, you might want to re-install.
If you did not install Ruby 2.2 via RVM*, here are instructions for changing OS X default Ruby installed using Brew.
(*I could not recommend RVM more strongly. Other people like rbenv to do the same job.)
Ruby Compass not working, code is bellow, and I've tried 10-20 methods on the web, any suggestions ?
In the screenshot you'll find an easier way to read the terminal dump of my gems and the error, in case you want to take something from there, you'll find the text under the screenshot
Thanks,
Cheers,
Robert
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help gem_dependencies gem dependencies file guide
gem help platforms gem platforms guide
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
http://localhost:8808/
with info about installed gems
Further information:
http://guides.rubygems.org
sh-3.2# gem list
*** LOCAL GEMS ***
bigdecimal (1.2.5, 1.2.0)
CFPropertyList (2.2.8, 2.2.0)
chunky_png (1.3.1)
compass (1.0.1)
compass-core (1.1.0.alpha.0, 1.0.1)
compass-import-once (1.0.5)
ffi (1.9.3)
io-console (0.4.2)
json (1.8.1, 1.7.7)
libxml-ruby (2.7.0, 2.6.0)
mini_portile (0.6.0)
minitest (5.4.1, 4.3.2)
multi_json (1.10.1)
nokogiri (1.6.3.1, 1.5.6)
power_assert (0.1.3)
psych (2.0.5, 2.0.0)
rake (10.3.2, 0.9.6)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rdoc (4.1.1, 4.0.0)
rubygems-update (2.4.1)
sass (3.4.2)
sqlite3 (1.3.9, 1.3.7)
test-unit (3.0.1, 2.0.0.0)
sh-3.2# compass compile -e production --force
LoadError on line ["54"] of /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb: cannot load such file -- rgbapng
Run with --trace to see the full backtrace
Fixed by installing the following compass extensions :
gem install compass-normalize
gem install compass-rgbapng
gem install toolkit
That did not fix it for me. However, I was able to fix it by reinstalling the compass gem using
gem uninstall compass
gem install compass
I think you can probably fix it even easier by just updating the compass gem to the latest version using gem update compass.
Note: If you use rails, you might also have to update your compass-rails gem. Otherwise, the compass watch command will start to hang. See this issue on github
We are attempting to install foreman on a raspberry as a demo for installation on larger machines such as the cubietruck. We have problems building the foreman-installer from source:
bundle install --without mysql2 pg test --path vendor
Your Gemfile lists the gem gettext_i18n_rails_js (>= 0.0.8) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem gettext (~> 2.0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem locale (<= 2.0.9) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem minitest (~> 4.7) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...............................................
Could not find gem 'capybara (~> 2.0.0) ruby' in the gems available on this
machine.
We have already manually installed capybara using gem and can locally see it:
sudo gem list
*** LOCAL GEMS ***
bundler (1.6.2)
capybara (2.0.0)
childprocess (0.5.3)
ffi (1.9.3)
mime-types (2.3)
mini_portile (0.6.0)
multi_json (1.10.1)
nokogiri (1.6.2.1)
rack (1.5.2)
rack-test (0.6.2)
rubyzip (1.1.4)
selenium-webdriver (2.42.0)
websocket (1.0.7)
xpath (1.0.0)
Any ideas what we are missing?
Regards
Stefan
I'm trying to build capybara-webkit on XP. I follow this instruction. I says:
8) Clone latest version of capybara-webkit from Github:
$ git clone git://github.com/thoughtbot/capybara-webkit.git
9) Bundle/Install capybara-webkit version:
$ cd ruby193\capybara-webkit
$ bundle install
I did so at the first time. It installed some gems. Then I followed the instruction steps but couldn't build capybara-webkit. So to begin one more time, I deleted all the gems that were installed manually. Now I follow all the same steps but bundle install doesn't work any more. I says that all the gems are present:
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems>cd capybara-webkit
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\capybara-webkit>bundle install
Resolving dependencies...
Using rake (0.9.2)
Using addressable (2.3.2)
Using bundler (1.3.5)
Using appraisal (0.4.0)
Using mime-types (1.22)
Using nokogiri (1.5.9)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using xpath (2.0.0)
Using capybara (2.1.0)
Using json (1.8.0)
Using capybara-webkit (1.0.0) from source at .
Using ffi (1.2.0)
Using childprocess (0.3.6)
Using diff-lcs (1.1.2)
Using websocket (1.0.6)
Using libwebsocket (0.1.7.1)
Using subexec (0.0.4)
Using mini_magick (3.2.1)
Using multi_json (1.5.0)
Using rack-protection (1.3.2)
Using rspec-core (2.6.4)
Using rspec-expectations (2.6.0)
Using rspec-mocks (2.6.0)
Using rspec (2.6.0)
Using rubyzip (0.9.9)
Using selenium-webdriver (2.27.2)
Using tilt (1.3.3)
Using sinatra (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
But now I check these gems with bundle show but it says they all were deleted:
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\capybara-webkit>bundle show sinatra
The gem sinatra has been deleted. It was installed at:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sinatra-1.3.5
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\capybara-webkit>bundle show selenium-webdriver
The gem selenium-webdriver has been deleted. It was installed at:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.27.2
C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\capybara-webkit>bundle show mini_magick
The gem mini_magick has been deleted. It was installed at:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mini_magick-3.2.1
How it can be that bundle install says they are present but bundle show says they are deleted? So bundle install doesn't work any more. How may I again use bundle install to install these gems again?
This solved it for me: "gem install" and "bundle install" do not install gem dependencies after manual gem deletion. How to inform Rubygems that gems were deleted manually?
(Delete the .gemspec files for the gems you have removed).
Using jruby-1.6.7 via rvm and gem version 1.8.24 I created a new project containing a Gemfile:
source 'http://rubygems.org'
gem 'google-api-client'
and a main.rb:
require 'google/api_client'
After
gem install bundler
bundle install
gem list
I get
addressable (2.2.8)
autoparse (0.3.1)
bouncy-castle-java (1.5.0146.1)
bundler (1.1.4)
extlib (0.9.15)
faraday (0.8.1, 0.7.6)
ffi (1.0.11 java)
google-api-client (0.4.3)
jruby-launcher (1.0.14 java)
jruby-openssl (0.7.7)
json (1.7.3 java)
jwt (0.1.4)
launchy (2.1.0 java)
multi_json (1.3.6)
multipart-post (1.1.5)
rack (1.4.1)
rake (0.9.2.2)
rubygems-bundler (1.0.2)
rubygems-update (1.8.24, 1.7.2)
rvm (1.11.3.3)
signet (0.3.4)
spoon (0.0.1)
But when I run ruby main.rb, it results in an error:
LoadError: no such file to load -- google/api_client
require at org/jruby/RubyKernel.java:1033
(root) at main.rb:1
On MRI everything seems to be working fine. The problem does not seem bound to any specific gem.
Can someone help me with this?
Unless you have JRUBY_OPTS=--1.9 in your environment, or you pass the --1.9 flag on the command line, JRuby will default to 1.8 mode, which means that you explicitly have to require 'rubygems' in main.rb before you load your gems.