8
respostas

Problemas ao editar o Gemfile e subir o servidor

Segue a mensagem do prompt de comando:

C:\SETUP\cmd\lojaonline λ edit Gemfile 'edit' não é reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes.

C:\SETUP\cmd\lojaonline λ bundle install DL is deprecated, please use Fiddle Fetching source index from https://rubygems.org/ Retrying source fetch due to error (2/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/. There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'. Retrying source fetch due to error (3/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/. There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'. Could not verify the SSL certificate for https://rubygems.org/. There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.

C:\SETUP\cmd\lojaonline λ rails server Could not find gem 'turbolinks (>= 0) x86-mingw32' in the gems available on this machine. Run bundle install to install missing gems.

8 respostas

Olá, Adriano.

Tente fazer um:

gem update --system

Oi Alexandre, tentei sua solução, porém ainda não conseguir erguer o server, ocorreu a seguinte mensagem:

C:\SETUP\cmd\lojaonline
λ bundle install
DL is deprecated, please use Fiddle
Fetching source index from https://rubygems.org/
Retrying source fetch due to error (2/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying source fetch due to error (3/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification. For
information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without
using SSL, edit your Gemfile sources and change 'https' to 'http'.

C:\SETUP\cmd\lojaonline
λ gem update --system
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

C:\SETUP\cmd\lojaonline
λ rails server
Could not find gem 'tzinfo-data (>= 0) x86-mingw32' in the gems available on this machine.
Run `bundle install` to install missing gems.

C:\SETUP\cmd\lojaonline
λ

Parece que deu erro no certificado do rubygems também ao fazer o update.

Para arrumar então, acho que tem que fazer o seguinte: - Baixar o arquivo http://curl.haxx.se/ca/cacert.pem para a pasta C:\RailsInstaller\ (ou alguma outra que você quiser) - Criar uma variável de ambiente chamada SSL_CERT_FILE com o valor C:\RailsInstaller\cacert.pem (ou com o nome da outra pasta) - Fechar os terminal e abrir novamente

Referências: - http://railsapps.github.io/openssl-certificate-verify-failed.html - https://gist.github.com/fnichol/867550

Ainda não consegui. O windows acusa que não encontrou o caminho específico. e eu já criei uma variável na Path


C:\RailsInstaller
λ C:\RailsInstaller\cacert.pem

C:\RailsInstaller
λ C:\RailsInstaller\cacert.pem

C:\RailsInstaller
λ gem update --system
'gem' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

C:\RailsInstaller
λ

Ele não reconhece mais o comando gem?

Será que alguma coisa acabou sendo removida do PATH?

eu não faço ideia, vou procurar no google está difícil, embora talvez para ti seja simples.

Oi, Adriano!

Pra mim não é simples também não!

Posso sugerir uma coisa: instalar um Ubuntu, nem que seja numa máquina virtual? Acho que facilita!