What is the rbenv?

Posted SUNNY_CHANGQI

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了What is the rbenv?相关的知识,希望对你有一定的参考价值。

  1. rbenv is a tool that allows you to manage multiple versions of Ruby on your system. It lets you switch between different Ruby versions on a per-user or per-project basis. It also provides support for installing and updating Ruby versions and plugins.
    rbenv 是一个允许您在系统上管理多个版本的 Ruby 的工具。它允许您在每个用户或每个项目的基础上在不同的 Ruby 版本之间切换。它还提供对安装和更新 Ruby 版本和插件的支持。
  2. rbenv works by injecting itself into your PATH and intercepting any Ruby-related commands. It then scans the current directory for a file named .ruby-version that specifies the Ruby version to use. If found, it executes the command using that Ruby version. Otherwise, it uses the global Ruby version that you have set with rbenv global.
    rbenv 通过将自身注入您的 PATH 并拦截任何与 Ruby 相关的命令来工作。然后它会扫描当前目录以查找名为 .ruby-version 的文件,该文件指定要使用的 Ruby 版本。如果找到,它将使用该 Ruby 版本执行命令。
  3. rbenv is simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well. It does not override shell commands like cd or touch, nor does it require any changes to your shell configuration files. It also does not handle installing Ruby versions by itself, but relies on ruby-build or other plugins to do so.
    rbenv 简单、不引人注意,并遵循 UNIX 的单一用途工具的传统,即做好一件事。它不会覆盖 cd 或 touch 等 shell 命令,也不需要对 shell 配置文件进行任何更改。

The Basic Uses

rbenv is a tool that allows you to manage multiple versions of Ruby on your system. It lets you switch between different Ruby versions on a per-user or per-project basis. It also provides support for installing and updating Ruby versions and plugins. [1][1]

Some basic uses for rbenv are:

  • To list all Ruby versions available to install: rbenv install --list
  • To list all Ruby versions installed on your system: rbenv versions
  • To install a specific Ruby version: rbenv install 3.0.2
  • To set the global Ruby version for your user: rbenv global 3.0.2
  • To set the local Ruby version for your project: rbenv local 3.0.2
  • To update rbenv and its plugins: rbenv update

This response is derived from web search results.

What the $%@! is SPDY

You may know about SPDY, an experimental protocol for a faster webhttp://www.chromium.org/spdy/spdy-whitepaper announced by Google in 2009. SPDY is now supported by two major browsers (Google Chrome and Mozilla Firefox) and it’s running on most of Google’s servers (also soon to be supported by nginx).

The main goal of SPDY is reducing the latency of web pages by multiplexing multiple http streams into one TCP connection and compressing http headers.

So instead of creating a TCP connection for each http request (like styles, scripts, images, or even ajax), SPDY-enabled browser will hold only one connection with the server.



source: http://www.igvita.com/2011/10/20/faster-web-vs-tcp-slow-start

Your server can tell the browser that it supports SPDY in two ways: setting the ‘Alternate-Protocol’ header, or by using a TLS handshake extension NPN (Next Protocol Negotiation). In the second case the server will send the supported protocols (i.e., SPDY/2 HTTP/1.1 HTTP/1.0) to browser before any data transfer will be performed, and the browser will choose the protocol that is preferable for the client.

You can learn more about SPDY by examing the protocol specification:http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 

Node.js and SPDY

The growing interest in both the SPDY protocol and Node.js created the need for a stable Node.js SPDY module when the first version was released last year. There were a number of issues with this first implementation: it was buggy, it did not support the default node.js builds, and it was incompatible with popular frameworks (only partial express support, and no socket.io support at all). Despite all of these issues it still attracted considerable some attention from the Node.js community.

Before continuing development on node-spdy it was clear that node.js core needed to be improved: the tls module was lacking NPN support, and there was no zlib functionality. While adding NPN callbacks to node was quite simple, I found that almost every OS has old SSL libraries without support for it. That’s why latest node version bundles openssl in it’s deps/ folder. Thanks to Isaac Z. Schlueter, zlib module was added in 0.6.0 version of node.js, and required only a little patching: it was missing stream dictionary support.

With all that working out of the box (only in 0.7.0-pre version of node now) I decided to start developing a completely new stable node-spdy version. You can take a look at what I’ve done so far at https://github.com/indutny/node-spdy . Note that to test it you’ll need to build v0.7.0-pre of node.js (currently at github’s master branch):

  git clone git://github.com/joyent/node.git
  cd node
  [sudo] ./configure
  [sudo] make
  [sudo] make install

I have one running SPDY server running at https://spdy-twitlog.indutny.com/. It’s demonstrating socket.io + express support of node-spdy module.



Features & Roadmap

Implemented:

  • Node.js compatible interface (same as for require(‘http’).Server )
  • Opening/closing streams
  • Fallback to https
  • Basic flow management (no WINDOW management so far, that means .pause() and .resume() will just buffer data internally instead of sending WINDOW_UPDATE to client)
  • Protocol errors handling
  • Stream scheduler (for priority management)
  • Push streams

Roadmap:

  • WINDOW_UPDATE and INITIAL_WINDOW_SIZE
  • Fixing bugs

以上是关于What is the rbenv?的主要内容,如果未能解决你的问题,请参考以下文章

What the $%@! is SPDY

What is the reason that a likelihood function is not a pdf?

What is the C4 model?

What is the C4 model?

What is the C4 model?

UVA10056 What is the Probability概率