Configure Rails Server

I am starting to work in Ruby following "Creating a New Rails Project ".

But I can not start the server. I tried:

  • rails server works, but got:

     Could not find gem 'tzinfo-data <>= 0> x86-mingw32' in the gems available on the machine. Run 'bundle install' to install missing gems. 
  • bundle install works, but got:

     An error occurred while installing rake (10.4.2), and Bundler cannot continue. Make sure that 'gem install rake -v '10.4.2'' succeeds before bundling. 
  • gem 'tzinfo-data' but received:

     Unknown command tzinfo-data 
  • gem install tzinfo-data :

     Could not find a valid gem 'tzinfo-data' <>= 0>, here is why: Unable to download data from... 

I have Windows 8.1. 64-bit


tzinfo-data was resolved using the cacert.pem file following the manual in the accepted answer. Today I am trying to install the bootstrap-sass gem file. Do I need another .pem file?

 Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/boots trap-sass-3.3.1.0.gem) An error occurred while installing bootstrap-sass (3.3.1.0), and Bundler cannot continue. Make sure that `gem install bootstrap-sass -v '3.3.1.0'` succeeds before bundling. 
+5
source share
1 answer

You have a common problem with SSL.

You will see the following error message:

 certificate verify failed 

The error message is because your system requires a new SSL certificate.

Here is the information about him:

http://railsapps.imtqy.com/openssl-certificate-verify-failed.html

On Windows:

Try updating your SSL certificates.

  • Download http://curl.haxx.se/ca/cacert.pem .

  • Save this file anywhere, for example:

     C:\RailsInstaller\cacert.pem 
  • At the command prompt, tell Ruby where to find the certificate file, for example:

     set SSL_CERT_FILE=C:\RailsInstaller\cacert.pem 
  • Retry the gem installation.

  • If it works, that's great. If you want this to work with every project on your system and also withstand a reboot, you can make the certificate file permanent by adding a certificate to the system. To do this, use the Windows Control Panel.

Credit and additional information: https://gist.github.com/fnichol/867550

+3
source

Source: https://habr.com/ru/post/1209624/


All Articles