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

92 views
Skip to first unread message

Bailey J

unread,
Apr 29, 2015, 4:41:40 AM4/29/15
to rubyonra...@googlegroups.com
"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?

Frederick Cheung

unread,
Apr 29, 2015, 4:43:56 AM4/29/15
to rubyonra...@googlegroups.com
That sounds like your Gemfile is actually requesting a gem called '4.2.1' rather than version 4.2.1 of something.

Fred 

Bailey J

unread,
Apr 29, 2015, 11:24:05 AM4/29/15
to rubyonra...@googlegroups.com
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?

Rob Biedenharn

unread,
Apr 29, 2015, 11:59:03 AM4/29/15
to rubyonra...@googlegroups.com
On 2015-Apr-29, at 11:24 , Bailey J <kidb...@gmail.com> wrote:

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


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?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f99d7296-5b96-4b4b-8fa4-c02251efebcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bailey J

unread,
Apr 29, 2015, 1:30:41 PM4/29/15
to rubyonra...@googlegroups.com
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

Rob Biedenharn

unread,
Apr 29, 2015, 3:19:08 PM4/29/15
to rubyonra...@googlegroups.com
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

Reply all
Reply to author
Forward
0 new messages