"Successfully installed rails-4.2.1 ERROR: Could not find a valid gem '4.2.1' (>= 0) in any repo"

“Successfully installed rails-4.2.1 ERROR: Could not find a valid gem ‘4.2.1’ (>= 0) in any repository”

Does anyone recognize this error message or understand what it is saying I should do?

That sounds like your Gemfile is actually requesting a gem called ‘4.2.1’ rather than version 4.2.1 of something.

Fred

Thanks that helps. So it was probably just the way I passed the command…

This is what I typed “sudo gem install rails 4.2.1 --no-ri --no-rdoc”, does that look funny?

Should I be concerned about the contents of this error message “Could not find a valid gem” or is it simply nothing more than what you just said?

What I wanted to do was pass the command with head in it but I don’t know the syntax for that and I couldn’t find a reference to it that quickly. Does anyone know the proper way to pass the command for get head?

Thanks that helps. So it was probably just the way I passed the command…

This is what I typed “sudo gem install rails 4.2.1 --no-ri --no-rdoc”, does that look funny?

You need to have “-v” in front of the version:

sudo gem install rails -v 4.2.1 --no-ri --no-rdoc

Other version specifiers might require quotes to keep the shell from attempting input/output redirection. E.g.:

sudo gem install rails -v '>= 4.2.1' --no-ri --no-rdoc

-Rob

Thanks Rob,

At this point I got the version I wanted even with the incorrect syntax, I can just leave it as it is?

-Bailey

Yes, of course, the response was basically to point out where your command had done something that you hadn't realized that you'd requested. More of a lesson for the next time when you really might need to request a version that's not the "default" that would be installed.

-Rob