3

まず、助けてくれてありがとう。私はプログラミングのまったくの初心者で、この Ruby on Rails チュートリアル (http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=3.2) から始めようとしています。

私はこれを約7時間理解しようとしてきましたが、抜く髪の毛が残っていないので、これらの神聖なページに目を向けています. ここで何度も何度も解決策を探しました。

システム: Mac OS X 10.7.5 ヒョウ、Xcode 4.5.2

Homebrew をインストールして何度も更新しました Homebrew を使用して rvm をインストールし、何度も更新しました git をインストールしました

システム上の標準の ruby​​ ($ ruby​​ -v で確認) は 1.8.7 です。

私の問題は、rvm を使用して新しいバージョンの Ruby ($ rvm install 1.9.3) をインストールしようとするたびに、次のエラーが発生することです。

Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and execute the instructions below.
Please use a separate terminal to execute any additional commands.

  Notes for Mac OS X 10.7.5, Xcode 4.5.2.

For JRuby:  Install the JDK. See http://developer.apple.com/java/download/  # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/

To use an RVM installed Ruby as default, instead of the system ruby:

    rvm install 1.8.7 # installs patch 357: closest supported version
    rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
    rvm alias create default 1.8.7

And reopen your terminal windows.

Xcode and gcc:

:

$ brew install libksba を実行しましたが、もう一度実行しようとすると、libksba が既にインストールされていると表示されます。

「$ rvm requirements」と入力すると、次のようになります。

      Notes for Mac OS X 10.7.5, Xcode 4.5.2.

For JRuby:  Install the JDK. See http://developer.apple.com/java/download/  # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/

To use an RVM installed Ruby as default, instead of the system ruby:

    rvm install 1.8.7 # installs patch 357: closest supported version
    rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
    rvm alias create default 1.8.7

And reopen your terminal windows.

Xcode and gcc:

Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.

Xcode 4.1 and earlier:
- Ruby will build fine.

Xcode 4.2 and later (including Command Line Tools for Xcode):
- If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.
- If you don't have gcc-4.2, you have two options to get it:
 * Install apple-gcc42 from Homebrew
 * Install osx-gcc-installer

  Homebrew:

  If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:

      brew update
      brew tap homebrew/dupes
      brew install autoconf automake apple-gcc42
      rvm pkg install openssl

  Xcode 4.2+ install or/and Command Line Tools for Xcode is required to provide make and other tools.

  osx-gcc-installer:

  If you don't use Homebrew, you can download and install osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer.

  Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire.

  ** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.

だから私は brew update brew tap homebrew/dupes brew install autoconf automake apple-gcc42 rvm pkg install openssl で何かをしなければならないと思います

「$ rvm pkg install openssl」が返されるまで、すべてが正常に機能しているように見えました。

Fetching openssl-1.0.1c.tar.gz to /Users/thierinvestmentservices/.rvm/archives
Extracting openssl to /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/thierinvestmentservices/.rvm/log/openssl/make.log

Please note that it's required to reinstall all rubies:

    rvm reinstall all --force

Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/thierinvestmentservices/.rvm/log/openssl.certs.log
Johns-MacBook-Pro:~ thierinvestmentservices$ rvm pkg install openssl
Fetching openssl-1.0.1c.tar.gz to /Users/thierinvestmentservices/.rvm/archives
Extracting openssl to /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/thierinvestmentservices/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/thierinvestmentservices/.rvm/log/openssl/make.log

Please note that it's required to reinstall all rubies:

    rvm reinstall all --force

Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/thierinvestmentservices/.rvm/log/openssl.certs.log

make.log 読み取り

"[2012-11-23 13:15:28] make
/Users/thierinvestmentservices/.rvm/scripts/functions/utility: line 116: make: command not found"

そして openssl.certs.log 読み取り

"[2012-11-23 14:04:04] update_openssl_certs
update_openssl_certs () 
{ 
    ( chpwd_functions="" builtin cd $rvm_usr_path/ssl && command curl -O http://curl.haxx.se/ca/cacert.pem && mv cacert.pem cert.pem )
}
current path: /Users/thierinvestmentservices
command(1): update_openssl_certs
/Users/thierinvestmentservices/.rvm/scripts/functions/pkg: line 205: cd: /Users/thierinvestmentservices/.rvm/usr/ssl: No such file or directory"

この時点で、文字は羽ばたきのように見えますが、何が起こっているのかわかりません。あるフォーラムの投稿で見たものを使用して rvm make をインストールしようとしましたが、たくさんの警告が表示されました。誰かに何か提案があれば、深く感謝します。私は完全に頭がいっぱいです。


以下の提案に従って、rvm を再インストールしようとしました。「rvm reload all --force」と入力しても何も起こりませんでした (新しいターミナル行が表示されただけです)。そこで、検索を行って rvm implode を使用し、https ://rvm.io/rvm/install/ ごとに再インストールしました。rvm インストールから次のメッセージが表示されました。

.....

Error running '__rvm_package extract /Users/thierinvestmentservices/.rvm/archives/yaml-0.1.4.tar.gz /Users/thierinvestmentservices/.rvm/src', please read /Users/thierinvestmentservices/.rvm/log/ruby-1.9.3-p327/yaml/extract.log
There has been an error while trying to extract the source. Halting the installation.
Installing Ruby from source to: /Users/thierinvestmentservices/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
tee: /Users/thierinvestmentservices/.rvm/log/ruby-1.9.3-p327/fetch.log: Permission denied
/Users/thierinvestmentservices/.rvm/scripts/functions/utility: line 116: /Users/thierinvestmentservices/.rvm/log/ruby-1.9.3-p327/fetch.log: Permission denied
Error running '/Users/thierinvestmentservices/.rvm/scripts/fetch http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.bz2', please read /Users/thierinvestmentservices/.rvm/log/ruby-1.9.3-p327/fetch.log
There has been an error fetching the ruby interpreter. Halting the installation.
ruby-1.9.3-p327 is not installed.
Creating alias default for ruby-1.9.3-p327.
Recording alias default for ruby-1.9.3-p327.
Creating default links/files
ruby-1.9.3-p327 is not installed.
Could not load ruby ruby-1.9.3-p327.
/Users/thierinvestmentservices/.rvm/scripts/alias: line 111: /Users/thierinvestmentservices/.rvm/rubies/ruby-1.9.3-p327/bin/ruby: No such file or directory

  * To start using RVM you need to run `source /Users/thierinvestmentservices/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

  * To start using rails you need to run `rails new <project_dir>`.

rvm install 1.9.3 を実行すると、以前と同じ場所に移動します。

Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and execute the instructions below.
Please use a separate terminal to execute any additional commands.

  Notes for Mac OS X 10.7.5, Xcode 4.5.2.

For JRuby:  Install the JDK. See http://developer.apple.com/java/download/  # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/

To use an RVM installed Ruby as default, instead of the system ruby:

    rvm install 1.8.7 # installs patch 357: closest supported version
    rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
    rvm alias create default 1.8.7

And reopen your terminal windows.

Xcode and gcc:

:

rvm の要件と rvm pkg install openssl もまったく同じ場所に移動します。ベスト、J

4

2 に答える 2

0

あなたは行くことができます:

http://connect.apple.com

Appleから直接最新のコマンドラインツールを入手する。Homebrewを使用している場合は、Homebrewが推奨するようにXcodeを完全にインストールすることをお勧めします。

于 2013-02-21T21:50:24.643 に答える