1

RubyonRailsを学ぼうとしています。Ruby Mineを購入し、Ubuntuにインストールしました。インストール手順に従い、RubyMineで最初のプロジェクトをデバッグしようとすると、次のようになります。

Error running Development: test001: Failed to install gems.

次のgemがインストールされませんでした:linecache19(0.5.12):linecache19のインストール中にエラーが発生しました:エラー:gemネイティブ拡張機能のビルドに失敗しました。/home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb * extconf.rbが失敗しました*何らかの理由でMakefileを作成できませんでした。おそらく、必要なライブラリやヘッダーが不足しています。詳細については、mkmf.logファイルを確認してください。構成オプションが必要になる場合があります。提供される構成オプション:-with-opt-dir --without-opt-dir --with-opt-include --without-opt-include = $ {opt-dir} / include --with-opt-lib - without-opt-lib = $ {opt-dir} / lib --with-make-prog --without-make-prog--srcdir=。--curdir --ruby = / home / stormkiernan / .rvm / rubies / ruby​​-1.9.2-p290 / bin / ruby​​ /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/ site_ruby / 1.9.1 / ruby​​gems / custom_require.rb:36:in require': no such file to load -- openssl (LoadError) from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require'from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/https.rb:92:in ' from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /home/stormkiernan/.rvm/rubies /ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in'from require' from /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:11:in /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ ruby / site_ruby / 1.9.1 / ruby​​gems / custom_require.rb:36:in require' from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require'from /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/ruby_core_source-0.1.5/lib/ ruby_core_source.rb:6:in ' from rubygems/custom_require>:33:inrequire'from ruby​​gems / custom_require>:33:in rescue in require' from rubygems/custom_require>:29:inrequire' from extconf.rb:2:in ' Gem files will remain installed in /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/linecache19-0.5.12 for inspection. Results logged to /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out /home/stormkiernan/Downloads/RubyMine-3.2.4/rb/gems/ruby-debug-base19x-0.11.30.pre2.gem: Error installing ruby-debug-base19x-0.11.30.pre2.gem: ERROR: Failed to build gem native extension. /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require':ロードするそのようなファイルはありません--openssl(LoadError)from /home/stormkiernan/.rvm /rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/https.rb:92:in 'from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /home/stormkiernan/.rvm/ gems / ruby​​-1.9.2-p290@global/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:11:in ' from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require'from /home/stormkiernan/.rvm/rubies/ruby-1.9.2- p290 / lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / custom_require.rb:36:in'from require' from /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:6:in ruby​​gems / custom_require>:33:inrescue require' from rubygems/custom_require>:33:inin require' from ruby​​gems / custom_require>:29:in'Gemrequire' from extconf.rb:2:inファイルはインストールされたままになります検査のために/home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/linecache19-0.5.12にあります。結果は/home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/linecache19-0.5.12/ext/trace_nums/gem_make.outに記録されました

さて、このエラーの直前に、私は次のように促されました:

デバッガーに必要なgemruby-debug-base19xは現在インストールされていません。インストールしますか?

私は「はい」と答え、ソフトウェアが必要とする必要な依存関係をダウンロードしようとしました(そして失敗したと思います)。ウィンドウのタイトルは「InstallingGems」でした。上記のエラーが発生したのは、このウィンドウが閉じた直後でした。

私は何をする必要がありますか?

編集:Ruby Env

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.10
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290
  - RUBY EXECUTABLE: /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
  - EXECUTABLE DIRECTORY: /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290
     - /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

エラーを表示する#2を編集します。

$ gem install ruby​​-debug-base19xフェッチ:linecache19-0.5.12.gem(100%)ネイティブ拡張機能の構築。これにはしばらく時間がかかる場合があります...エラー:ruby-debug-base19xのインストール中にエラーが発生しました:エラー:gemネイティブ拡張機能のビルドに失敗しました。

    /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

extconf.rb *extconf.rbが失敗しました*何らかの理由でMakefileを作成できませんでした。おそらく、必要なライブラリやヘッダーが不足しています。詳細については、mkmf.logファイルを確認してください。構成オプションが必要になる場合があります。

提供される構成オプション:-with-opt-dir --without-opt-dir --with-opt-include --without-opt-include = $ {opt-dir} / include --with-opt-lib - without-opt-lib = $ {opt-dir} / lib --with-make-prog --without-make-prog--srcdir=。--curdir --ruby = / home / stormkiernan / .rvm / rubies / ruby​​-1.9.2-p290 / bin / ruby​​:29:in require': no such file to load -- ruby_core_source (LoadError) from <internal:lib/rubygems/custom_require>:29:inrequire'from extconf.rb:2:in `'

Gemファイルは、検査のために/home/stormkiernan/.rvm/gems/ruby-1.9.2-p290/gems/linecache19-0.5.12にインストールされたままになります。結果は/home/stormkiernan/.rvm/gems/ruby-1.9.2-p290/gems/linecache19-0.5.12/ext/trace_nums/gem_make.outに記録されました

4

3 に答える 3

3

私は同じ問題を抱えていて、これに出くわす前に非常に多くのオプションを試しました:http: //beginrescueend.com/packages/openssl/

$ rvm pkg install openssl
$ rvm remove 1.9.2m
$ rvm install 1.9.2 --with-openssl-dir=$rvm_path/usr

これにより、linecache19rubydebug-19およびopensslの問題が解決されます。

*** extconf.rb failed ***
custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
于 2011-11-27T00:15:07.660 に答える
0

代わりに、コマンドプロンプトから次の手順を実行してください。

sudo gem install ruby-debug-base19x

rvmを使用している場合(推奨):

gem install ruby-debug-base19x

編集済み:最初にこれを入力してください: rvm --default use 1.9.2

于 2011-09-24T00:42:23.767 に答える
0

私はubuntuで次のコマンドを実行してこのエラーを解決しました:

$ sudo apt-get install ruby-dev
于 2016-06-02T02:42:45.437 に答える