相关疑难解决方法(0)

为什么我要将unicorn或thin而不是WEBrick用于开发目的?

我最近发现有些人更喜欢使用unicorn_rails默认的WEBrick作为Web服务器来开发Rails应用程序.

我知道如果我想在生产中使用独角兽,那么在开发中尝试它是有道理的,但由于配置在生产中是不同的,它甚至是相关的吗?

使用thinunicorn代替WEBrick开发Rails应用程序(例如速度或其他一些功能),是否有任何真正的,有形的优势?或者这仅仅是个人偏好的问题?

ruby-on-rails thin webrick unicorn

41
推荐指数
2
解决办法
7605
查看次数

配置WEBrick以在Rails 4中使用SSL

我有一个Rails应用程序,我想在SharePoint 2013上部署.

为了实现某种身份验证方法,我需要WEBrick server提供服务ssl https并收听传入的https port https://localhost:3001.不幸的是,我在配置服务器方面不是很有经验.

我只找到了一些旧版Rails版本的过时教程,似乎不再适合这项工作了.

任何提示都非常感谢.

ssl ruby-on-rails localhost webrick ruby-on-rails-4

18
推荐指数
2
解决办法
1万
查看次数

配置WEBrick以使用自动生成的自签名SSL/HTTPS证书

我想用SSL/HTTPS在本地开发我的Ruby on Rails应用程序,但是我在设置服务器以使用SSL时遇到了麻烦.以下是我到目前为止已经尝试过的事情:

rails server [options]

rails server命令没有附带ssl选项(rails server --help):

Usage: rails server [mongrel, thin, etc] [options]
  -p, --port=port         Runs Rails on the specified port.
                          Default: 3000
  -b, --binding=ip        Binds Rails to the specified ip.
                          Default: 0.0.0.0
  -c, --config=file       Use custom rackup configuration file
  -d, --daemon            Make server run as a Daemon.
  -u, --debugger          Enable the debugger
  -e, --environment=name  Specifies the environment to run this server under
                          (test/development/production).
                          Default: development

  -P, --pid=pid           Specifies the PID file. …
Run Code Online (Sandbox Code Playgroud)

ruby ssl https ruby-on-rails webrick

13
推荐指数
1
解决办法
1万
查看次数

如何配置WEBrick以使用HTTPS的中间证书?

我目前在我的Rails应用程序中使用以下选项来启用WEBrick的HTTPS:

{
    :Port => 3000,
    :environment => (ENV['RAILS_ENV'] || "development").dup,
    :daemonize => false,
    :debugger => false,
    :pid => File.expand_path("tmp/pids/server.pid"),
    :config => File.expand_path("config.ru"),
    :SSLEnable => true,
    :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
    :SSLPrivateKey => OpenSSL::PKey::RSA.new(
        File.open("certificates/https/key.pem").read),
    :SSLCertificate => OpenSSL::X509::Certificate.new(
        File.open("certificates/https/cert.pem").read),
    :SSLCertName => [["CN", WEBrick::Utils::getservername]]
}
Run Code Online (Sandbox Code Playgroud)

我如何指定中间证书?

rack openssl webrick ruby-on-rails-3

10
推荐指数
1
解决办法
4166
查看次数

webrick使用ssl做什么?

我有一个rails 4应用程序,我想在webrick上使用SSL运行它.我需要做什么?

我已经为这个域和startet添加了ssl证书

bundle exec rails s -e production -p 3001 --binding = 0.0.0.0

现在我收到了这个错误:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at  to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while …
Run Code Online (Sandbox Code Playgroud)

ssl ruby-on-rails webrick

0
推荐指数
1
解决办法
533
查看次数