I am having issues installing the ScrAPI gem:
ERROR: Error installing scrapi:
ffi requires Ruby version >= 1.9.2.
I am running RVM and if I do ruby -v I get:
ruby -v
ruby 1.9.2p110 (2010-12-20 revision 30269) [i686-linux]
I am guessing you did
$ sudo gem install scrapi
sudo ruby -v
Unless you followed Wayne's sudo RVM install I'm guessing root uses a different ruby.
Related
So, I just updated Ruby version on a CentOS 7 box, to allow for the use of OpenSSL, using this guide:
https://www.server-world.info/en/note?os=CentOS_7&p=ruby23
However, the version is now set to 2.3.8 as per:
$ ruby -v
ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
and:
$ which ruby
/opt/rh/rh-ruby23/root/usr/bin/ruby
$ which gem
/opt/rh/rh-ruby23/root/usr/bin/gem
BUT, gem throws the same error as before hand:
$ sudo gem install openssl
ERROR: Error installing openssl:
openssl requires Ruby version >= 2.3.0.
Any ideas?
Try installing gems without sudo. I did such test locally
$ ruby -v
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
$ sudo ruby -v
sudo: ruby: command not found
Probably your superuser env is not using the same ruby version as your current user's env.
When I am installing the passenger rack I am getting the following error
I have upgraded to the version 1.9.3 as shown below
any suggestion
[centos#ip-10-1-213-37 puppet]$ sudo gem install passenger
ERROR: Error installing passenger:
rake requires Ruby version >= 1.9.3.
[centos#ip-10-1-213-37 puppet]$ ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
You call ruby -v as regular user, and sudo gem install passenger as root. I suggest you to upgrade your ruby version; you could use rvm for this purpose.
I tried installing github-pages using gem:
sudo gem install 'github-pages'
However, I get the following error:
ERROR: Error installing github-pages:
public_suffix requires Ruby version >= 2.0.
But when I checked my ruby version using ruby --version, it shows:
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
So, my understanding is that gem is somehow referencing an older version of Ruby(previous was 1.9.3). How can I fix this problem? My OS is Ubuntu 14.04 and I upgraded ruby using ruby-install.
I believe you do not need to install github-pages globally, as you are trying.
Just removing sudo in front of your command will do the trick:
gem install 'github-pages'
I have install rbev
rbenv version
2.0.0-p247 (set by /Users/amritdeepdhungana/.rbenv/version)
, ruby
ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]\
and rails
rails -v
Rails 4.0.1
I have create new project and bundle it. But I get this problem
Installing rake (10.1.1)
Errno::EACCES: Permission denied - /Library/Ruby/Gems/2.0.0/build_info/rake-10.1.1.info
An error occurred while installing rake (10.1.1), and Bundler cannot continue.
Make sure that `gem install rake -v '10.1.1'` succeeds before bundling.
After that, I have install rake gem but again I got error
gem install rake -v '10.1.1'
ERROR: Could not find a valid gem 'rake' (= 10.1.1), here is why:
Unable to download data from https://rubygems.org/ - too many connection resets (https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz)
ERROR: Possible alternatives: rake
How can I set the permission while install any gem package ?
Like #bjhaid said, you're trying to install these gems into your system Ruby.
/Library/Ruby/Gems/2.0.0/build_info/rake-10.1.1.info
Ruby 2.0.0p247 is bundled w/Mavericks. Specifically:
$ /usr/bin/ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
My self-built (rvm) version is has a slightly different version string:
$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
To find out which ruby is actually being used, try which ruby. Make sure you've properly installed rbenv, and installed a new local Ruby.
It almost looks like you haven't set your PATH up correctly, but your answer to Nick Veys' question doesn't look like it. I would surmise that you haven't installed any ruby under rbenv yet. What does rbenv versions look like?
If I try to install nokogiri, I receive the following error:
rvmsudo gem install nokogiri
ERROR: Error installing nokogiri:
nokogiri requires Ruby version >= 1.9.2.
If I check my ruby version, it tells me I am running ruby1.9.3
ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [i686-linux]
If I use printenv, these are my env variables:
rvm_bin_path=/home/jenkins/.rvm/bin
GEM_HOME=/home/jenkins/.rvm/gems/ruby-1.9.3-p448#nokogiri
SHELL=/bin/bash
TERM=xterm-color
IRBRC=/home/jenkins/.rvm/rubies/ruby-1.9.3-p448/.irbrc
HUSHLOGIN=FALSE
MY_RUBY_HOME=/home/jenkins/.rvm/rubies/ruby-1.9.3-p448
USER=jenkins
rvm_path=/home/jenkins/.rvm
L1=-
rvm_prefix=/home/jenkins
MAIL=/var/mail/jenkins
PATH=/home/jenkins/.rvm/gems/ruby-1.9.3-p448#nokogiri/bin:/home/jenkins/.rvm/gems/ruby-1.9.3-p448#global/bin:/home/jenkins/.rvm/rubies/ruby-1.9.3-p448/bin:/home/jenkins/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
PWD=/home/jenkins
LANG=C
rvm_version=1.21.3 (stable)
SHLVL=1
HOME=/home/jenkins
LOGNAME=jenkins
GEM_PATH=/home/jenkins/.rvm/gems/ruby-1.9.3-p448#nokogiri:/home/jenkins/.rvm/gems/ruby-1.9.3-p448#global
install_flag=1
RUBY_VERSION=ruby-1.9.3-p448
_=/usr/bin/printenv
I have some pretty bad luck with RVM and rather than break my entire installation, I thought I'd ask here.
Why can't I proceed with the installation of nokogiri?
I'm on Debian.
Just try gem install nokogiri as you have RVM installed. See here Installing Nokogiri for other things to install with it.
Like below :
# nokogiri requirements
sudo apt-get install libxslt-dev libxml2-dev
gem install nokogiri
See my answer here for the part ERROR: While executing gem ... (Errno::EACCES) ` Permission denied
I have added an older version of nokogiri (1.5.11) to chef cookbook and it worked fine after OR manually add it on the server:
chef_gem "nokogiri" do
action :install
version "1.5.11"
compile_time false if respond_to?(:compile_time)
end
OR
/usr/local/ruby-1.9.3-p392/bin/gem install nokogiri --version=1.5.11
(use absolute path where u see the error; means /my_path/gem install nokogiri).