Error: Could not find a valid gem installing rails on mac
You can follow as steps below:
gem sources -a http://rubygems.org
gem install rails -v 5.0.0.1
ERROR: Could not find a valid gem 'rails' (= 0) in any repository
Use rvm gem install rails
I just did it and it worked for me.
If you don't have rvm, then:
- If you don't have ruby:
Install RVM and ruby:
$ curl -L https://get.rvm.io | bash -s stable --ruby
or
Additionally with rails:
$ curl -L https://get.rvm.io | bash -s stable --rails
could not find a valid gem 'ruby'
Ruby is not a gem. Ruby is the programming language.
What the error is telling you is that the version of Ruby that you have on your machine (try running ruby --version
) is below that which the application you are trying to install requires.
I'm not familiar with Metasploit in particular, but your options seem to be:
to try upgrading what you have installed (
apt-get update && apt-get upgrade
),if you are on the latest version of Ruby available in the repositories, to try using a Ruby version manager (my preference is rbenv, but each has its advantages), or
to compile Ruby from source.
Related Topics
Rails 5.2.0 with Ruby 2.5.1 Console - 'Warning:' 'Already' Initialized Constant Fileutils::Version
Ruby on Rails: Errors.Add_To_Base VS. Errors.Add
How to Make Rails 3 Assets Precompile Faster
Best Way to Combine Fragment and Object Caching for Memcached and Rails
Augmenting a Model from an External Gem
How to Make Object Instance a Hash Key in Ruby
How to Install Rvm Without Root Access
How to Use an Overridden Constant in an Inheritanced Class
Array.Include? Multiple Values
Accessing Ruby Class Variables with Class_Eval and Instance_Eval
Carrierwave Crop Specific Version
Using Typeahead from Twitter Bootstrap in a Form (Formtastic)
What's the Variable Scope Within 'Class_Eval' String