I have the following problem and whatever I try, nothing helps. I hope someone could help me with this.
I have a redhat server and I'm trying to install redmine on it. Redmine needs Ruby >= 1.8.7 to run so I installed it and when I execute ruby -v in the console it says I have version 1.8.7 (so that's great)
[root#vms redmine]# ruby -v
ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
But when i try to install the passenger gem I need to run redmine on Apache it says I don't have ruby 1.8.7
[root#vms redmine]# gem install passenger
ERROR: Error installing passenger:
rake requires Ruby version >= 1.8.6
Does anyone know how this can be fixed?
You need newer ruby, you have patchlevel 0, try to get patchlevel 173 at least.
RVM can help you.
Using vendor build ruby packages is an exercise in frustration.
For anything with ruby it's easier just to use RVM and build a virtual environment. You can then build exactly what you need and have an environment you can replicate reliably. Also you won't end up clobbering your vendor's Ruby install.
Related
I am trying to install XSpear 1.4.1 and I have ruby version 2.7.1 32-bit as seen by running the ruby -v command:
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [i686-linux]
But still on running the command sudo gem install XSpear-1.4.1.gem in the XSpear directory, I get an error message saying:
ERROR: Error installing XSpear-1.4.1.gem:
rubyzip requires Ruby version >= 2.4.
Why is this happening? Please help.
Thank you.
Ok so... After further investigation I got to know that I had Ruby 1.3.0 pre-installed in my computer and I had installed Ruby 2.7.1 over it. I don't know why but during the installation process of Ruby 2.7.1, I wasn't shown any error or warning saying that ruby was already installed (strange). So I guess the computer took Ruby 2.3.0 as the default Ruby version while Ruby displayed the newer version as its default.
I had to remove rbenv, Ruby 2.3.0 and 2.7.1 completely and then reinstall rbenv and Ruby 2.7.1 and then I could install XSpear.
I don't know if it is a bug or just my foolishness but I'm happy this got solved.
Thank you for your time.
I have CentOS6 on which I have configured puppet server. but Whenever I try to execute ant puppet command it fails with ruby issue. see the output for puppet --version
-bash-4.1# puppet --version
/usr/local/rvm/gems/ruby-1.9.3-p551/gems/json-1.8.3/lib/json/ext/parser.so: [BUG] Segmentation fault
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
Aborted (core dumped)
Tried re-installing puppet and ruby but no luck.
Try I had a similar issue, and did a few things and it was fixed before I knew which one fixed it, but try this:
gem update --system
yum install ruby-json
Good luck!
Your Ruby 1.8.7 is trying to use a 1.9.3 gem for some reason.
This can be tricky to get right. In your shoes, I would check if I can
get rid of ruby1.8 altogether
make ruby1.9 the default Ruby on the system
make sure that Puppet always uses ruby1.9
Specifics depend heavily on the way Ruby and Puppet were actually installed.
Sounds strange but I cannot tell which ruby version is installed. If I do
rvm rubies
I get
ruby-1.9.2-p180 [ i686 ]
but with
ruby -v
I get
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
When trying to
rvm upgrade 1.8.7-p302 1.9.2-p180
I get an error
ERROR: Ruby 'ruby-1.8.7-p302' is not installed - please install it first.
ERROR: Error migrating gems.
So, which one is it? 1.8.7-p302 or 1.9.2-p180 ???
Please help me out here! Thanks
You get 1.8.7 from the installed version of your system. Use rvm use --default 1.9.2 in order to set the Ruby installed via rvm as default.
RVM basically changes your $PATH variable to point to a different Ruby version than the one installed on your system.
Please also make sure that you have done steps 2 and 3 of the installation guide and confirmed that RVM is correctly set up.
You might have 1.8.7 because you did sudo apt-get install ruby or something like that, and then later ran rvm install 1.9.2. Is that the case?
The answer is both as mentioned by other posters. As a recommendation you should uninstall the ruby packages that come with the system if you choose to manage ruby version using rvm.
Here is a question related to Ruby.
The Express Installation of OpenNebula 2.2.0 on CentOS has caused me big problems, since it installs Ruby 1.8.5, which is incompatible with Sunstone.
I installed Ruby 1.9.2 after executing the Express installation, but the problem remained, since Sunstone tried to use the old Ruby-installation.
I don't know how to configure, so that the newer Ruby-version should be used instead.
After this problem I reinstalled CentOS and installad Ruby 1.8.7.
When I do ruby -v, it shows:
ruby 1.8.7 (2010-12-23 patchlevel 330).
But when I do 'gem update –system', it says
(Gem::InstallError)
rubygems-update requries Ruby Version >= 1.8.7.. An older version was installed before from the CentOS-repository (for yum install) and apparently the GEM install doesn't understand that I have installed a newer version.
So my question is:
How should I configure my system so that all programs will understand to use Ruby 1.8.7 ?
Thanks!
Anders Branderud
I suggest to try using Ruby Version Manager
bash < <(curl -s https://rvm.ioinstall/rvm)
and then, or even better before :), read some documentation about rvm.
On my Ubunto 8.04 (Hardy) server, I'm trying to upgrade rubygems. When I try to update, it tells me I need Ruby >= 1.8.7, when I run ruby -v to check the version I have it tells me I have 1.8.7
$gem update --system
rubygems-update requires Ruby version >= 1.8.7
$ruby -v
ruby 1.8.7 (2008-06-20 patchlevel 22) [x86_64-linux]
I just upgraded ruby from source. I also have RVM installed but I'm not using it. How can I make rubygems use the proper version of ruby?
That's a very old version of Ruby 1.8.7 - I guess that it might be from a distribution package. Current versions of RubyGems should probably be matched with the latest patch level of Ruby.
I think that the simplest thing to do is to choose one way of managing your Ruby installation and remove any other Ruby stuff that was put on the system by other methods. RVM is probably the best approach ATM.