设置Rails服务器

Rol*_*rov 5 ruby gem ruby-on-rails-3

我是Ruby的初学者,遵循" 创建新的Rails项目 ".

但我无法启动服务器.我试过了:

  1. 跑步rails server但得到:

    Could not find gem 'tzinfo-data <>= 0> x86-mingw32' in the gems available on the machine. 
    Run 'bundle install' to install missing gems.
    
    Run Code Online (Sandbox Code Playgroud)
  2. 跑步bundle install但得到:

    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.
    
    Run Code Online (Sandbox Code Playgroud)
  3. gem 'tzinfo-data' 但得到了:

    Unknown command tzinfo-data
    
    Run Code Online (Sandbox Code Playgroud)
  4. gem install tzinfo-data:

    Could not find a valid gem 'tzinfo-data' <>= 0>, here is why:
    Unable to download data from...
    
    Run Code Online (Sandbox Code Playgroud)

我有Windows 8.1.64位


tzinfo-datacacert.pem在接受的答案中按照指南后的文件解决了.今天我正在尝试安装bootstrap-sassgem文件.我需要另一个.pem文件吗?

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.
Run Code Online (Sandbox Code Playgroud)

joe*_*son 3

您遇到了常见的 SSL 问题。

您将看到此错误消息:

certificate verify failed
Run Code Online (Sandbox Code Playgroud)

该错误消息是因为您的系统需要新的 SSL 证书。

以下是有关它的信息:

http://railsapps.github.io/openssl-certificate-verify-failed.html

在 Windows 上:

尝试升级您的 SSL 证书。

  1. 下载http://curl.haxx.se/ca/cacert.pem

  2. 将此文件保存在您想要的任何位置,例如:

    C:\RailsInstaller\cacert.pem
    
    Run Code Online (Sandbox Code Playgroud)
  3. 在命令行上,告诉 Ruby 在哪里可以找到 cert 文件,例如:

    set SSL_CERT_FILE=C:\RailsInstaller\cacert.pem
    
    Run Code Online (Sandbox Code Playgroud)
  4. 重试 gem 安装。

  5. 如果有效的话,那就太好了。如果您希望它适用于系统上的每个项目,并且在重新启动后也能正常工作,那么您可以通过在系统范围内添加证书来使证书文件永久化。为此,请使用 Windows 控制面板。

信用和更多信息:https://gist.github.com/fnichol/867550