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.
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
...
I had a similar issue just now and thought I would add a comment to this issue. Our dev vm's are currently running windows 7, therefore I needed to run my command prompt as administrator for the gem installation to work correctly.
Related
I downloaded Ruby 2.0.0 and have gem version 2.0.14. I need at least gem version 2.0.3 to meet the requirements to run my script. However, when I try to update:
gem update --system
I get a message that says "Latest version currently installed, Aborting." What do I need to do to get this to update properly? As a result of this, I can't install the gems that I need. For example:
gem install watir
returns
ERROR: could not find a valid gem 'watir' ()= 0), here is why: Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/latest_specs.4.8.gz).
Could this be a proxy issue, or is it something entirely different?
EDIT gem env:
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.14
- RUBY VERSION: 2.0.0 (2014-05-08 patchlevel 481) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Users/shwheelz/Documents/Ruby200/lib/ruby/gems/2.
0.0
- RUBY EXECUTABLE: C:/Users/shwheelz/Documents/Ruby200/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Users/shwheelz/Documents/Ruby200/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Users/shwheelz/Documents/Ruby200/lib/ruby/gems/2.0.0
- C:/Users/shwheelz/.gem/ruby/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
Try to run
gem install rubygems-update
update_rubygems
I have encountered the same problem. Because I was gem source deleted.
Type
gem sources -l
See if there is one gem source, if not, run following
gem sources --add https://rubygems.org/
To remove a source
gem sources --remove https://rubygems.org/
then try again.
I am getting an error while running bundle install in my rails project.
sahil#debian:~/workspace/blog$ bundle install
/usr/bin/env: ruby: No such file or directory
Ruby
sahil#debian:~/workspace/blog$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86__64-linux]
sahil#debian:~/workspace/blog$ which ruby
/home/sahil/.rvm/bin/ruby
Received the below error while installing ruby through rvm.
Error running 'env GEM_PATH=/home/sahil/.rvm/gems/ruby-2.0.0-p0:/home/sahil/.rvm/gems/ruby-2.0.0-p0#global:/home/sahil/.rvm/gems/ruby-2.0.0-p0:/home/sahil/.rvm/gems/ruby-2.0.0-p0#global GEM_HOME=/home/sahil/.rvm/gems/ruby-2.0.0-p0 /home/sahil/.rvm/rubies/ruby-2.0.0-p0/bin/ruby -d /home/sahil/.rvm/src/rubygems-2.0.3/setup.rb --verbose',
please read /home/sahil/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
rvm env
sahil#debian:~$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.3
- RUBY VERSION: 2.0.0 (2013-02-24 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/sahil/.rvm/gems/ruby-2.0.0-p0
- RUBY EXECUTABLE: /home/sahil/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
- EXECUTABLE DIRECTORY: /home/sahil/.rvm/gems/ruby-2.0.0-p0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/sahil/.rvm/gems/ruby-2.0.0-p0
- /home/sahil/.rvm/gems/ruby-2.0.0-p0#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => t
rvm env looks ok. Not sure what have I missed.
please follow this basics steps for using RVM (copied from https://stackoverflow.com/a/15570121/497756):
rvm install 2.0.0
rvm use 2.0.0 --default # The default arg is needed only first time
gem install bundler
bundle install
also another answer showing more details: https://stackoverflow.com/a/10591301/497756
I'm attempting to install s3nuke. From an up to date Mac OS with up to date ruby and gems.
First I cloned the git repository to my /var/src/ (now /var/src/s3nuke).
The install on the README is simple enough:
gem install s3nuke
Response:
ERROR: Could not find a valid gem 's3nuke' (>= 0) in any repository
Most help on this error assume I'm behind some proxy. I'm not. I can ping rubygems or rubyforge just fine. I can update successfully and even install other gems. Here are some examples:
$ gem -v
1.8.24
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
$ gem install rubygems-update
Successfully installed rubygems-update-1.8.24
1 gem installed
Installing ri documentation for rubygems-update-1.8.24...
Installing RDoc documentation for rubygems-update-1.8.24...
$ update_rubygems
RubyGems 1.8.24 installed
$ sudo gem update --system
Latest version currently installed. Aborting.
So let's try some other gems:
$ gem install eventmachine
Fetching: eventmachine-1.0.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed eventmachine-1.0.0
1 gem installed
Installing ri documentation for eventmachine-1.0.0...
Installing RDoc documentation for eventmachine-1.0.0...
$ gem install clamp
Fetching: clamp-0.5.0.gem (100%)
Successfully installed clamp-0.5.0
1 gem installed
Installing ri documentation for clamp-0.5.0...
Installing RDoc documentation for clamp-0.5.0...
So I'm up to date, and can install other gems. But s3nuke still won't budge.
$ gem install s3nuke
ERROR: Could not find a valid gem 's3nuke' (>= 0) in any repository
I even added another gem source (http://gems.rubyforge.org/), but still no luck.
Can you help?
Here's my env:
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.a
- RUBY VERSION: 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-12
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/my_username/.gem/ruby/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://rubygems.org/", "http://gems.rubyforge.org/"]
- REMOTE SOURCES:
- http://rubygems.org/
- http://gems.rubyforge.org/
I'd try to install manually, but the s3nuke git repository doesn't include a s3nuke.gem.
What do you recommend?
if you use bundler, you can add to your Gemfile next line:
gem "s3nuke", :git => "git://github.com/SFEley/s3nuke.git"
Or you can install with specific_install gem
gem install specific_install
gem specific_install -l http://github.com/SFEley/s3nuke.git
You can directly add the following line to your Gemfile:
gem 's3nuke', :git => 'git://github.com/SFEley/s3nuke.git'
The gem will be installed the next time you do bundle install (assuming you're using Bundler)
It seems this process is far harder than it should be.
Currently, I have ruby 1.9.2 installed manually. I wanted to update this to use RVM. So I installed that successfully, and then installed 1.9.3-p0, which is in my RVM directory under /zenph/.rvm
I upgraded rubygems using http://docs.rubygems.org/read/chapter/3
And my environment shows:
rvm 1.10.0
ruby 1.9.3p0
gem 1.8.12
So, why does "gem environment" show:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.12
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.9.1
- /home/zenph/.gem/ruby/1.9.1
What can I try to resolve this?
To see which Ruby is the default one, open a terminal and use:
rvm list default
To specify a Ruby to be the default , open a terminal and use:
rvm --default use 1.9.3
Docs
I just installed the engineyard gem and would like to know how to uninstall all ri / RDoc documentation of engineyard post installation
Is it safe to remove all files from the following folder c:\Ruby192\lib\ruby\gems\1.9.1\doc
c:\Ruby192\bin>gem install engineyard
Welcome to Engine Yard!
Deploying for the first time? The Engine Yard Pandas want to help you!
Email pandas#engineyard.com with your questions or queries.
(Panda = 1. Polite Agent of Non-Destructive Assimilation; 2. Cute fluffy an
imal.)
We wish you every success with your business!
- The Pandas
Successfully installed rest-client-1.6.3
Successfully installed highline-1.6.2
Successfully installed json_pure-1.5.3
Successfully installed escape-0.0.4
Successfully installed engineyard-serverside-adapter-1.4.1
Successfully installed net-ssh-2.1.4
Successfully installed engineyard-1.3.20
7 gems installed
Installing ri documentation for rest-client-1.6.3...
Installing ri documentation for highline-1.6.2...
Installing ri documentation for json_pure-1.5.3...
Installing ri documentation for escape-0.0.4...
Installing ri documentation for engineyard-serverside-adapter-1.4.1...
Installing ri documentation for net-ssh-2.1.4...
Installing ri documentation for engineyard-1.3.20...
Installing RDoc documentation for rest-client-1.6.3...
Installing RDoc documentation for highline-1.6.2...
I haven't had any experience with that gem yet, but I hope this can help you to track your rdoc and ri doc path.
gem env
on my Mac system, I found this path from INSTALLATION DIRECTORY
/opt/experiment/ruby/lib/ruby/gems/1.9.1/doc/
And when I open it (or explore in Windows) I saw some gems' rdoc/ri doc inside this path. Try to remove your gem's doc there. Let me know if it works, it's working here on my Mac.
Next time when you install rubygems but don't want ri/rdoc installed, remember to type this --no-rdoc --no-ri option when you do gem install something
As a reference comparison I'll just copy paste my gem env here
. gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i386-darwin9.8.0]
- INSTALLATION DIRECTORY: /opt/experiment/ruby/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /opt/experiment/ruby/bin/ruby
- EXECUTABLE DIRECTORY: /opt/experiment/ruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-9
- GEM PATHS:
- /opt/experiment/ruby/lib/ruby/gems/1.9.1
- /Users/arie/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gemcutter_key" => "********************************"
- :gem => "--no-ri --no-rdoc"
- :sources => ["http://rubygems.org"]
- REMOTE SOURCES:
- http://rubygems.org
.
Update (7/28/2019): --no-ri --no-rdoc no longer work in Rubygems >= 2.0. Alternatively, you can use --no-document to omit documentation.