【问题标题】:Installing Rails on Mac OS fails with several errors在 Mac OS 上安装 Rails 失败并出现几个错误
【发布时间】:2015-10-24 22:53:25
【问题描述】:

我正在尝试在我的 Mac OS v10.10.4 系统上安装 Rails,但当我运行 brew install rbenv ruby-build 时它失败了。错误是:

Error: Permission denied - /usr/local/etc/openssl
Warning: Bottle installation failed: building from source.

在过程结束时它说:

installing man3/d2i_SSL_SESSION.3ssl
i2d_SSL_SESSION.3ssl => d2i_SSL_SESSION.3ssl
installing man3/ssl.3ssl
Cannot create directory /usr/local/etc/openssl: Permission denied

这是我在这次尝试中尝试的所有内容的完整日志:

Mac-213978b7b1793718b9:ROR developer$ brew install rbenv ruby-build
Warning: rbenv-0.4.0 already installed
==> Installing ruby-build dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2d_1.yosemite.bottle.tar.gz
Error: Permission denied - /usr/local/etc/openssl
Warning: Bottle installation failed: building from source.
==> Downloading https://www.openssl.org/source/openssl-1.0.2d.tar.gz
######################################################################## 100.0%
==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2d_1 --openssldir=/usr/local/etc/openssl no-ssl2 zlib-dynamic shared enable-cms darw
==> make depend
==> make
==> make test
==> make install MANDIR=/usr/local/Cellar/openssl/1.0.2d_1/share/man MANSUFFIX=ssl
installing man3/d2i_SSL_SESSION.3ssl
i2d_SSL_SESSION.3ssl => d2i_SSL_SESSION.3ssl
installing man3/ssl.3ssl
Cannot create directory /usr/local/etc/openssl: Permission denied
make: *** [install_sw] Error 13

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
Installing Elixir fails due to OpenSSL errors. https://github.com/Homebrew/homebrew/issues/33218
Mac-213978b7b1793718b9:ROR developer$ rbenv install --patch 2.1.1
rbenv: no such command `install`
Mac-406c8f4772a8:ROR developer$ rbenv instal --patch 2.1.1
rbenv: no such command `instal`
Mac-406c8f4772a8:ROR developer$ brew install --HEAD ruby-build
==> Installing ruby-build dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2d_1.yosemite.bottle.tar.gz
==> Pouring openssl-1.0.2d_1.yosemite.bottle.tar.gz
Error: Permission denied - /usr/local/etc/openssl
Warning: Bottle installation failed: building from source.
==> Downloading https://www.openssl.org/source/openssl-1.0.2d.tar.gz
Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2d.tar.gz
==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2d_1 --openssldir=/usr/local/etc/openssl no-ssl2 zlib-dynamic shared enable-cms darw
==> make depend
==> make
brew install rbenv ruby-build==> make test
==> make install MANDIR=/usr/local/Cellar/openssl/1.0.2d_1/share/man MANSUFFIX=ssl
installing man3/d2i_SSL_SESSION.3ssl
i2d_SSL_SESSION.3ssl => d2i_SSL_SESSION.3ssl
installing man3/ssl.3ssl
Cannot create directory /usr/local/etc/openssl: Permission denied
make: *** [install_sw] Error 13

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
Installing Elixir fails due to OpenSSL errors. https://github.com/Homebrew/homebrew/issues/33218
Mac-213978b7b1793718b9:ROR developer$ brew install rbenv ruby-build
Warning: rbenv-0.4.0 already installed
==> Installing ruby-build dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2d_1.yosemite.bottle.tar.gz
==> Pouring openssl-1.0.2d_1.yosemite.bottle.tar.gz
Error: Permission denied - /usr/local/etc/openssl
Warning: Bottle installation failed: building from source.
==> Downloading https://www.openssl.org/source/openssl-1.0.2d.tar.gz
Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2d.tar.gz
==> perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2d_1 --openssldir=/usr/local/etc/openssl no-ssl2 zlib-dynamic shared enable-cms darw
^Z
[1]+  Stopped                 brew install rbenv ruby-build
Mac-213978b7b1793718b9:ROR developer$ curl https://gist.githubusercontent.com/andschwa/11334511/raw/563d5c2efb869cafb0c65404d12243822bba2817/ruby-2.1.1-readline.patch | rbenv install --patch 2.1.1
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0rbenv: no such command `install'
100  1713  100  1713    0     0   1499      0  0:00:01  0:00:01 --:--:--  1498
(23) Failed writing body
Mac-213978b7b1793718b9:ROR developer$

到目前为止,我已经查看了以下链接:

【问题讨论】:

标签: ruby-on-rails ruby ssl homebrew rbenv


【解决方案1】:

先运行这个命令

sudo chown -R <your username>:admin /usr/local

&lt;your username&gt; 替换为您在 Mac 上的用户名。所以,就我而言,我会跑

sudo chown -R Adrian:admin /usr/local

然后尝试安装 rbenv 和 ruby​​-build。

您的问题很可能是由使用软件包安装程序(.pkg 文件)引起的,因为它们倾向于在不应该以 root 身份创建文件。

注意:你可以通过运行whoami找到你的用户名

【讨论】:

  • 请参阅“Are my permissions for /usr/local/ correct?”,其中更详细地讨论了这一点。特别是,请阅读 cmets 的答案,这些答案揭示了许多其他问题。
  • @theTinMan 我不同意那里的答案,因为 /usr/local 不是系统目录,也不意味着包含敏感或受保护的数据,但这是一个好点。为了保留 /usr/local 的权限,homebrew 应该安装到不同的目录。
【解决方案2】:

如果家庭 brew 安装导致问题,您的第一反应应该是运行

brew doctor

这应该可以诊断大多数问题,甚至建议补救措施(例如其他答案中提到的那些)

【讨论】:

    【解决方案3】:

    几个月前将我的 mac 更新为 EI 字幕后,我终于使用了本教程 Setup Ruby On Rails on Mac OS X 10.11 El Capitan,这很有效。

    这是来自控制台的日志,它将解释所有发生的事情。以及最后我是如何运行我的第一个 ruby​​ 应用程序的。我犯了几个初学者可能会犯的错误,但我最终成功了。这是它的外观。

    rptwsthi:~ developer$ $ gcc
    -bash: $: command not found
    rptwsthi:~ developer$ gcc
    2016-06-27 15:16:33.881 xcodebuild[2150:87788] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
    2016-06-27 15:16:36.662 xcodebuild[2153:87846] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
    clang: error: no input files
    rptwsthi:~ developer$ $ xcode-select -p
    -bash: $: command not found
    rptwsthi:~ developer$ xcode-select -p
    /Applications/Xcode.app/Contents/Developer
    rptwsthi:~ developer$ gcd
    -bash: gcd: command not found
    rptwsthi:~ developer$ gcc
    clang: error: no input files
    rptwsthi:~ developer$ xcode-select --install
    xcode-select: note: install requested for command line developer tools
    rptwsthi:~ developer$ gcc --version
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
    Apple LLVM version 7.3.0 (clang-703.0.29)
    Target: x86_64-apple-darwin15.4.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    rptwsthi:~ developer$ git --version
    git version 2.6.3
    rptwsthi:~ developer$ --l --global
    -bash: --l: command not found
    rptwsthi:~ developer$ -l --global
    -bash: -l: command not found
    rptwsthi:~ developer$ git config -l -global
    error: did you mean `--global` (with two dashes ?)
    rptwsthi:~ developer$ git config -l --global
    filter.media.clean=git-media-clean %f
    filter.media.smudge=git-media-smudge %f
    user.name=rptwsthi
    user.email=awasthi.arp@gmail.com
    core.excludesfile=/Users/developer/.gitignore_global
    difftool.sourcetree.cmd=opendiff "$LOCAL" "$REMOTE"
    difftool.sourcetree.path=
    mergetool.sourcetree.cmd=/Applications/SourceTree.app/Contents/Resources/opendiff-w.sh "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$MERGED"
    mergetool.sourcetree.trustexitcode=true
    filter.hawser.clean=git hawser clean %f
    filter.hawser.smudge=git hawser smudge %f
    filter.hawser.required=true
    color.ui=true
    filter.lfs.clean=git-lfs clean %f
    filter.lfs.smudge=git-lfs smudge %f
    filter.lfs.required=true
    rptwsthi:~ developer$ brew
    Example usage:
    brew [info | home | options ] [FORMULA...]
    brew install FORMULA...
    brew uninstall FORMULA...
    brew search [foo]
    brew list [FORMULA...]
    brew update
    brew upgrade [--all | FORMULA...]
    brew pin/unpin [FORMULA...]
    
    Troubleshooting:
    brew doctor
    brew install -vd FORMULA
    brew [--env | config]
    
    Brewing:
    brew create [URL [--no-fetch]]
    brew edit [FORMULA...]
    https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
    
    Further help:
    man brew
    brew home
    rptwsthi:~ developer$ brew install gpg
    Warning: You are using OS X 10.11.
    We do not provide support for this pre-release version.
    You may encounter build failures or other breakage.
    
    ==> Downloading ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.19.tar.bz2
    
    curl: (28) Connection time-out
    Trying a mirror...
    ==> Downloading https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.19.tar.bz2
    ######################################################################## 100.0%
    ==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/gnupg/1.4.19 --disable-asm
    ==> make
    ==> make check
    ==> make install
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/gpg
    Target /usr/local/bin/gpg
    already exists. You may want to remove it:
    rm '/usr/local/bin/gpg'
    
    To force the link and overwrite all conflicting files:
    brew link --overwrite gnupg
    
    To list all files that would be deleted:
    brew link --overwrite --dry-run gnupg
    
    Possible conflicting files are:
    /usr/local/bin/gpg -> /usr/local/MacGPG2/bin/gpg2
    ==> Summary
    ?  /usr/local/Cellar/gnupg/1.4.19: 53 files, 5.4M, built in 9.9 minutes
    rptwsthi:~ developer$
    rptwsthi:~ developer$
    [Restored 27-Jun-2016, 17:19:44]
    Last login: Mon Jun 27 17:18:49 on console
    Restored session: Mon Jun 27 16:56:08 IST 2016
    rptwsthi:~ developer$ cat ~/.ssh/id_rsa.pub
    cat: /Users/developer/.ssh/id_rsa.pub: No such file or directory
    rptwsthi:~ developer$ git config --globle color.ui
    error: unknown option `globle'
    usage: git config [<options>]
    
    Config file location
    --global              use global config file
    --system              use system config file
    --local               use repository config file
    -f, --file <file>     use given config file
    --blob <blob-id>      read config from given blob object
    
    Action
    --get                 get value: name [value-regex]
    --get-all             get all values: key [value-regex]
    --get-regexp          get values for regexp: name-regex [value-regex]
    --get-urlmatch        get value specific for the URL: section[.var] URL
    --replace-all         replace all matching variables: name value [value_regex]
    --add                 add a new variable: name value
    --unset               remove a variable: name [value-regex]
    --unset-all           remove all matches: name [value-regex]
    --rename-section      rename section: old-name new-name
    --remove-section      remove a section: name
    -l, --list            list all
    -e, --edit            open an editor
    --get-color           find the color configured: slot [default]
    --get-colorbool       find the color setting: slot [stdout-is-tty]
    
    Type
    --bool                value is "true" or "false"
    --int                 value is decimal number
    --bool-or-int         value is --bool or --int
    --path                value is a path (file or directory name)
    
    Other
    -z, --null            terminate values with NUL byte
    --name-only           show variable names only
    --includes            respect include directives on lookup
    
    rptwsthi:~ developer$ git config --globle color.ui true
    error: unknown option `globle'
    usage: git config [<options>]
    
    Config file location
    --global              use global config file
    --system              use system config file
    --local               use repository config file
    -f, --file <file>     use given config file
    --blob <blob-id>      read config from given blob object
    
    Action
    --get                 get value: name [value-regex]
    --get-all             get all values: key [value-regex]
    --get-regexp          get values for regexp: name-regex [value-regex]
    --get-urlmatch        get value specific for the URL: section[.var] URL
    --replace-all         replace all matching variables: name value [value_regex]
    --add                 add a new variable: name value
    --unset               remove a variable: name [value-regex]
    --unset-all           remove all matches: name [value-regex]
    --rename-section      rename section: old-name new-name
    --remove-section      remove a section: name
    -l, --list            list all
    -e, --edit            open an editor
    --get-color           find the color configured: slot [default]
    --get-colorbool       find the color setting: slot [stdout-is-tty]
    
    Type
    --bool                value is "true" or "false"
    --int                 value is decimal number
    --bool-or-int         value is --bool or --int
    --path                value is a path (file or directory name)
    
    Other
    -z, --null            terminate values with NUL byte
    --name-only           show variable names only
    --includes            respect include directives on lookup
    
    rptwsthi:~ developer$ git config --global color.ui true
    rptwsthi:~ developer$ git config --global user.name rptwsthi
    rptwsthi:~ developer$ git config --global user.email awasthi.arp@gmail.com
    rptwsthi:~ developer$ ssh-keygen -t rsa -C awasthi.arp@gmail.com
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/developer/.ssh/id_rsa): RubyFile
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Saving key "RubyFile" failed: passphrase is too short (minimum four characters)
    rptwsthi:~ developer$ ssh-keygen -t rsa -C awasthi.arp@gmail.com
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/developer/.ssh/id_rsa): RubyGitRSA
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in RubyGitRSA.
    Your public key has been saved in RubyGitRSA.pub.
    The key fingerprint is:
    SHA256:xPvbSBQV+/jJjwbEe9Q/Vcy6Zr1BkkHGwXVi+Z5YU4Q awasthi.arp@gmail.com
    The key's randomart image is:
    +---[RSA 2048]----+
    |            *==Bo|
    |       .   ..*E.*|
    |        o ... o+o|
    |       . . .o=o++|
    |        S ...o*+=|
    |         o  o+==+|
    |          o  =+ +|
    |         . +  .+ |
    |          o ... .|
    +----[SHA256]-----+
    rptwsthi:~ developer$ cat -/.ssh/idrsa.pub
    cat: illegal option -- /
    usage: cat [-benstuv] [file ...]
    rptwsthi:~ developer$ cat ~/.ssh/idrsa.pub
    cat: /Users/developer/.ssh/idrsa.pub: No such file or directory
    rptwsthi:~ developer$ cat ~/.ssh/RubRubyGitRSA.pub
    cat: /Users/developer/.ssh/RubRubyGitRSA.pub: No such file or directory
    rptwsthi:~ developer$ cat /.ssh/RubRubyGitRSA.pub
    cat: /.ssh/RubRubyGitRSA.pub: No such file or directory
    rptwsthi:~ developer$ cat RubRubyGitRSA.pub
    cat: RubRubyGitRSA.pub: No such file or directory
    rptwsthi:~ developer$ ls ~/.ssh/id_rsa
    ls: /Users/developer/.ssh/id_rsa: No such file or directory
    rptwsthi:~ developer$ cat RubyGitRSA
    -----BEGIN RSA PRIVATE KEY-----
    Proc-Type: 4,ENCRYPTED
    DEK-Info: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    
    +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    -----END RSA PRIVATE KEY-----
    rptwsthi:~ developer$ cat RubyGitRSA.pub
    ssh-rsa XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX awasthi.arp@gmail.com
    rptwsthi:~ developer$ sst -T git@github.com
    -bash: sst: command not found
    rptwsthi:~ developer$ ssh -T git@github.com
    Warning: Permanently added the RSA host key for IP address '192.30.252.120' to the list of known hosts.
    Permission denied (publickey).
    rptwsthi:~ developer$ ssh -T git@github.com
    Permission denied (publickey).
    rptwsthi:~ developer$ heroku keys:add RubyGitRSA.pub
    -bash: heroku: command not found
    rptwsthi:~ developer$ add RubyGitRSA.pub
    -bash: add: command not found
    rptwsthi:~ developer$ ls ~/.ssh/id_rsa
    ls: /Users/developer/.ssh/id_rsa: No such file or directory
    rptwsthi:~ developer$ ssh-keygen -t rsa -C awasthi.arp@gmail.com
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/developer/.ssh/id_rsa): Users/developer/.ssh/id_rsa
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Saving key "Users/developer/.ssh/id_rsa" failed: No such file or directory
    rptwsthi:~ developer$ ssh-keygen -t rsa -C awasthi.arp@gmail.com
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/developer/.ssh/id_rsa): /Users/developer/.ssh/id_rsa
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /Users/developer/.ssh/id_rsa.
    Your public key has been saved in /Users/developer/.ssh/id_rsa.pub.
    The key fingerprint is:
    XXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX awasthi.arp@gmail.com
    The key's randomart image is:
    +---[XXX XXXX]----+
    |      ..Xx   .x+.|
    |       *.=x  X+ .|
    |      x +x.  x .+|
    |       x.+.. ..=.|
    |      x X.*.+ . +|
    |     . +.= *.  ..|
    |      +.=.=.. .  |
    |      .= xx. .   |
    |       .X  .     |
    +----[XXXXXX]-----+
    rptwsthi:~ developer$ cat ~/.ssh/id_rsa.pub
    ssh-rsaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX awasthi.arp@gmail.com
    rptwsthi:~ developer$ ssh -T git@github.com
    Hi rptwsthi! You've successfully authenticated, but GitHub does not provide shell access.
    rptwsthi:~ developer$ gem install rails -v 4.2.6
    Fetching: i18n-0.7.0.gem (100%)
    Successfully installed i18n-0.7.0
    Fetching: thread_safe-0.3.5.gem (100%)
    Successfully installed thread_safe-0.3.5
    Fetching: tzinfo-1.2.2.gem (100%)
    Successfully installed tzinfo-1.2.2
    Fetching: activesupport-4.2.6.gem (100%)
    Successfully installed activesupport-4.2.6
    Fetching: rack-1.6.4.gem (100%)
    Successfully installed rack-1.6.4
    Fetching: rack-test-0.6.3.gem (100%)
    Successfully installed rack-test-0.6.3
    Fetching: mini_portile2-2.1.0.gem (100%)
    Successfully installed mini_portile2-2.1.0
    Fetching: pkg-config-1.1.7.gem (100%)
    Successfully installed pkg-config-1.1.7
    Fetching: nokogiri-1.6.8.gem (100%)
    Building native extensions.  This could take a while...
    Successfully installed nokogiri-1.6.8
    Fetching: loofah-2.0.3.gem (100%)
    Successfully installed loofah-2.0.3
    Fetching: rails-html-sanitizer-1.0.3.gem (100%)
    Successfully installed rails-html-sanitizer-1.0.3
    Fetching: rails-deprecated_sanitizer-1.0.3.gem (100%)
    Successfully installed rails-deprecated_sanitizer-1.0.3
    Fetching: rails-dom-testing-1.0.7.gem (100%)
    Successfully installed rails-dom-testing-1.0.7
    Fetching: builder-3.2.2.gem (100%)
    Successfully installed builder-3.2.2
    Fetching: erubis-2.7.0.gem (100%)
    Successfully installed erubis-2.7.0
    Fetching: actionview-4.2.6.gem (100%)
    Successfully installed actionview-4.2.6
    Fetching: actionpack-4.2.6.gem (100%)
    Successfully installed actionpack-4.2.6
    Fetching: activemodel-4.2.6.gem (100%)
    Successfully installed activemodel-4.2.6
    Fetching: arel-6.0.3.gem (100%)
    Successfully installed arel-6.0.3
    Fetching: activerecord-4.2.6.gem (100%)
    Successfully installed activerecord-4.2.6
    Fetching: globalid-0.3.6.gem (100%)
    Successfully installed globalid-0.3.6
    Fetching: activejob-4.2.6.gem (100%)
    Successfully installed activejob-4.2.6
    Fetching: mime-types-data-3.2016.0521.gem (100%)
    Successfully installed mime-types-data-3.2016.0521
    Fetching: mime-types-3.1.gem (100%)
    Successfully installed mime-types-3.1
    Fetching: mail-2.6.4.gem (100%)
    Successfully installed mail-2.6.4
    Fetching: actionmailer-4.2.6.gem (100%)
    Successfully installed actionmailer-4.2.6
    Fetching: thor-0.19.1.gem (100%)
    Successfully installed thor-0.19.1
    Fetching: railties-4.2.6.gem (100%)
    Successfully installed railties-4.2.6
    Fetching: bundler-1.12.5.gem (100%)
    Successfully installed bundler-1.12.5
    Fetching: concurrent-ruby-1.0.2.gem (100%)
    Successfully installed concurrent-ruby-1.0.2
    Fetching: sprockets-3.6.2.gem (100%)
    Successfully installed sprockets-3.6.2
    Fetching: sprockets-rails-3.0.4.gem (100%)
    Successfully installed sprockets-rails-3.0.4
    Fetching: rails-4.2.6.gem (100%)
    Successfully installed rails-4.2.6
    Parsing documentation for i18n-0.7.0
    Installing ri documentation for i18n-0.7.0
    Parsing documentation for thread_safe-0.3.5
    Installing ri documentation for thread_safe-0.3.5
    Parsing documentation for tzinfo-1.2.2
    Installing ri documentation for tzinfo-1.2.2
    Parsing documentation for activesupport-4.2.6
    Installing ri documentation for activesupport-4.2.6
    Parsing documentation for rack-1.6.4
    Installing ri documentation for rack-1.6.4
    Parsing documentation for rack-test-0.6.3
    Installing ri documentation for rack-test-0.6.3
    Parsing documentation for mini_portile2-2.1.0
    Installing ri documentation for mini_portile2-2.1.0
    Parsing documentation for pkg-config-1.1.7
    Installing ri documentation for pkg-config-1.1.7
    Parsing documentation for nokogiri-1.6.8
    Installing ri documentation for nokogiri-1.6.8
    Parsing documentation for loofah-2.0.3
    Installing ri documentation for loofah-2.0.3
    Parsing documentation for rails-html-sanitizer-1.0.3
    Installing ri documentation for rails-html-sanitizer-1.0.3
    Parsing documentation for rails-deprecated_sanitizer-1.0.3
    Installing ri documentation for rails-deprecated_sanitizer-1.0.3
    Parsing documentation for rails-dom-testing-1.0.7
    Installing ri documentation for rails-dom-testing-1.0.7
    Parsing documentation for builder-3.2.2
    Installing ri documentation for builder-3.2.2
    Parsing documentation for erubis-2.7.0
    Installing ri documentation for erubis-2.7.0
    Parsing documentation for actionview-4.2.6
    Installing ri documentation for actionview-4.2.6
    Parsing documentation for actionpack-4.2.6
    Installing ri documentation for actionpack-4.2.6
    Parsing documentation for activemodel-4.2.6
    Installing ri documentation for activemodel-4.2.6
    Parsing documentation for arel-6.0.3
    Installing ri documentation for arel-6.0.3
    Parsing documentation for activerecord-4.2.6
    Installing ri documentation for activerecord-4.2.6
    Parsing documentation for globalid-0.3.6
    Installing ri documentation for globalid-0.3.6
    Parsing documentation for activejob-4.2.6
    Installing ri documentation for activejob-4.2.6
    Parsing documentation for mime-types-data-3.2016.0521
    Installing ri documentation for mime-types-data-3.2016.0521
    Parsing documentation for mime-types-3.1
    Installing ri documentation for mime-types-3.1
    Parsing documentation for mail-2.6.4
    Installing ri documentation for mail-2.6.4
    Parsing documentation for actionmailer-4.2.6
    Installing ri documentation for actionmailer-4.2.6
    Parsing documentation for thor-0.19.1
    Installing ri documentation for thor-0.19.1
    Parsing documentation for railties-4.2.6
    Installing ri documentation for railties-4.2.6
    Parsing documentation for bundler-1.12.5
    Installing ri documentation for bundler-1.12.5
    Parsing documentation for concurrent-ruby-1.0.2
    Installing ri documentation for concurrent-ruby-1.0.2
    Parsing documentation for sprockets-3.6.2
    Installing ri documentation for sprockets-3.6.2
    Parsing documentation for sprockets-rails-3.0.4
    Installing ri documentation for sprockets-rails-3.0.4
    Parsing documentation for rails-4.2.6
    Installing ri documentation for rails-4.2.6
    Done installing documentation for i18n, thread_safe, tzinfo, activesupport, rack, rack-test, mini_portile2, pkg-config, nokogiri, loofah, rails-html-sanitizer, rails-deprecated_sanitizer, rails-dom-testing, builder, erubis, actionview, actionpack, activemodel, arel, activerecord, globalid, activejob, mime-types-data, mime-types, mail, actionmailer, thor, railties, bundler, concurrent-ruby, sprockets, sprockets-rails, rails after 393 seconds
    33 gems installed
    rptwsthi:~ developer$ rbenv rehash
    rptwsthi:~ developer$ rails -v
    Rails 4.2.6
    
    cd HelloWorldFetching gem metadata from https://rubygems.org/
    Fetching version metadata from https://rubygems.org/
    Fetching dependency metadata from https://rubygems.org/
    Resolving dependencies.....
    Using rake 11.2.2
    Using i18n 0.7.0
    Using json 1.8.3
    Using minitest 5.9.0
    Using thread_safe 0.3.5
    Using builder 3.2.2
    Using erubis 2.7.0
    Using mini_portile2 2.1.0
    Using pkg-config 1.1.7
    Using rack 1.6.4
    Using mime-types-data 3.2016.0521
    Using arel 6.0.3
    Using debug_inspector 0.0.2
    Using bundler 1.12.5
    Using byebug 9.0.5
    Using coffee-script-source 1.10.0
    Using execjs 2.7.0
    Using thor 0.19.1
    Using concurrent-ruby 1.0.2
    Using multi_json 1.12.1
    Using sass 3.4.22
    Using tilt 2.0.5
    Using spring 1.7.1
    Using sqlite3 1.3.11
    Using rdoc 4.2.2
    Using tzinfo 1.2.2
    Using nokogiri 1.6.8
    Using rack-test 0.6.3
    Using mime-types 3.1
    Using binding_of_caller 0.7.2
    Installing coffee-script 2.4.1
    Installing uglifier 3.0.0
    Using sprockets 3.6.2
    Installing sdoc 0.4.1
    Using activesupport 4.2.6
    Using loofah 2.0.3
    Using mail 2.6.4
    Using rails-deprecated_sanitizer 1.0.3
    Using globalid 0.3.6
    Using activemodel 4.2.6
    Installing jbuilder 2.5.0
    Using rails-html-sanitizer 1.0.3
    Using rails-dom-testing 1.0.7
    Using activejob 4.2.6
    Using activerecord 4.2.6
    Using actionview 4.2.6
    Using actionpack 4.2.6
    Using actionmailer 4.2.6
    Using railties 4.2.6
    Using sprockets-rails 3.0.4
    Installing coffee-rails 4.1.1
    Installing jquery-rails 4.1.1
    Using rails 4.2.6
    Installing sass-rails 5.0.4
    Installing web-console 2.3.0
    Installing turbolinks 2.5.3
    Bundle complete! 12 Gemfile dependencies, 56 gems now installed.
    Use `bundle show [gemname]` to see where a bundled gem is installed.
    run  bundle exec spring binstub --all
    
    * bin/rake: spring inserted
    * bin/rails: spring inserted
    rptwsthi:~ developer$
    rptwsthi:~ developer$
    rptwsthi:~ developer$
    rptwsthi:~ developer$ cd HelloWorld
    rptwsthi:HelloWorld developer$ rake db:create
    rptwsthi:HelloWorld developer$ rails server
    => Booting WEBrick
    => Rails 4.2.6 application starting in development on http://localhost:3000
    => Run `rails server -h` for more startup options
    => Ctrl-C to shutdown server
    [2016-06-27 21:08:36] INFO  WEBrick 1.3.1
    [2016-06-27 21:08:36] INFO  ruby 2.3.1 (2016-04-26) [x86_64-darwin15]
    [2016-06-27 21:08:37] INFO  WEBrick::HTTPServer#start: pid=37160 port=3000
    
    
    Started GET "/" for 127.0.0.1 at 2016-06-27 21:08:56 +0530
    Processing by Rails::WelcomeController#index as HTML
    Rendered /Users/developer/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/templates/rails/welcome/index.html.erb (12.4ms)
    Completed 200 OK in 139ms (Views: 110.9ms | ActiveRecord: 0.0ms)
    
    
    Started GET "/rails/info/properties" for 127.0.0.1 at 2016-06-27 21:09:22 +0530
    Processing by Rails::InfoController#properties as */*
                                                        Rendered /Users/developer/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/templates/rails/info/properties.html.erb (0.6ms)
                                                        Completed 200 OK in 117ms (Views: 53.6ms | ActiveRecord: 1.7ms)
    

    【讨论】:

      猜你喜欢
      • 2019-12-28
      • 1970-01-01
      • 1970-01-01
      • 2022-06-29
      • 2017-08-28
      • 1970-01-01
      • 2021-07-31
      • 2015-07-10
      • 2016-11-08
      相关资源
      最近更新 更多