PDA

View Full Version : Ruby Wrong Version problem



Disrupt
2015-03-31, 07:45
Hello, could I seem to have a problem regarding the ruby version. When entered the command " ruby -v " it shows that my current Ruby version is 1.9.3p194, but when I entered the command " rvm list " it shows me that my Ruby version is 2.2.1. Kali seems to treat Ruby as version 1.9.3p194 because I can't install the metasploit_data_models-0.23.1 and I need Ruby version 2.1 and above for it to be installed.

Yusuf_saeed
2015-04-21, 03:11
i think i have the same problem as you but my error is :
metasploit-concern -v '0.4.0'

look bro at first try to run
gem install metasploit_data_models
if it dosn't work then go and install ruby latest version by following that steops

1-
apt-get autoremove
2-
apt-get install build-essential zlib1g zlib1g-dev libreadline6 libreadline6-dev libssl-dev
3-
\curl -L https://get.rvm.io | bash -s -- --ignore-dotfiles --autolibs=0 --ruby
4-
source /etc/profile.d/rvm.sh
5-
type rvm | head -n 1
6-
ruby -v
7-
rvm gemset use global
8-
gem update
9-
gem install rails

then open a new terminal click : Edit --> profile preferences --> title and command --> √ on 'run command as a login shell
then close all terminals and open new one write
ruby -v
is it 2.2.2 ?
if yes then run
gem install metasploit_data_models

hope my suloution fix your problem :)

zeppy
2016-08-22, 14:47
I was able to use these steps to update Ruby, but this has broken metasploit:


root@kali:/# msfconsole
Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.10
Could not find rake-10.4.2 in any of the sources
Run `bundle install` to install missing gems.


'bundle install' gives errors:

Could not locate Gemfile or .bundle/ directory



'gem pristine bcrypt --version 3.1.10' gives error:

root@kali:/# gem pristine bcrypt --version 3.1.10
ERROR: While executing gem ... (Gem::Exception)
Failed to find gems ["bcrypt"] = 3.1.10




I took a machine snapshot so I'm going to revert back, but wanted to share my results in case anyone else has this issue.