我正在尝试学习Ruby on Rails。我购买了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 = /家庭/ stormkiernan / .rvm /红宝石/红宝石1.9.2-P290 /斌/红宝石 /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/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
需要'来自 /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
需要'来自 /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
' /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
需要'来自 /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:in
需要'来自 rubygems / custom_require>:33:inrescue in require' from rubygems/custom_require>:29:in
require'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)来自 /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
' /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
需要'来自 /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
需要'来自 /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in 来自rubygems / custom_require>的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
':33:在require' from rubygems/custom_require>:33:in
救援'来自'来自' rubygems / custom_require>:29:require' 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
现在,就在此错误之前,我被提示:
调试器所需的gem ruby-debug-base19x目前不是 安装。你想安装吗?
我回答“是”,并尝试(我假设失败)下载软件所需的任何必要依赖项。窗口标题是“安装宝石”。在此窗口关闭后,我立即收到了上述错误。
我需要做什么?
编辑: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 = /家庭/ stormkiernan / .rvm /红宝石/红宝石1.9.2-P290 /斌/红宝石 :29:
中require': no such file to load -- ruby_core_source (LoadError) from <internal:lib/rubygems/custom_require>:29:in
要求'来自 extconf.rb:2:在''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
答案 0 :(得分: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
这解决了linecache19 rubydebug-19和openssl:
的问题*** extconf.rb failed ***
custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
答案 1 :(得分:0)
请从命令提示符处执行以下操作:
sudo gem install ruby-debug-base19x
如果你正在使用rvm(推荐):
gem install ruby-debug-base19x
EDITED:首先输入:rvm --default use 1.9.2
答案 2 :(得分:0)
我在ubuntu中运行以下命令解决了这个错误:
$ sudo apt-get install ruby-dev