The command gem install rails
produces the following output.
$ gem install rails
ERROR: Could not find a valid gem 'rails' (\>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
I've tried to solve the issue myself, but haven't found a solution yet. How can I solve this error?