使用 RubyMine 接收错误

发布于 2024-12-06 04:01:45 字数 6466 浏览 0 评论 0原文

我正在尝试学习 Ruby on Rails。我购买了 Ruby Mine 并将其安装在 Ubuntu 上。我按照安装说明进行操作,当我尝试在 RubyMine 中调试我的第一个项目时,我得到了以下信息:

运行开发时出错:test001:无法安装 gem。

未安装以下 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/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要求来自 /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:in 要求来自 /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 '来自 /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要求来自 /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:inrequire' 来自 rubygems/custom_require>:33:in rescue in require' 来自 rubygems/custom_require>:29:inrequire' from extconf.rb:2:in ' Gem 文件将保留安装在 /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 /home/stormkiernan/Downloads/RubyMine-3.2.4/rb/gems/ruby-debug-base19x-0.11.30.pre2.gem: 安装 ruby​​-debug-base19x-0.11.30.pre2.gem 时出错:错误:无法 构建 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/rubygems/custom_require.rb:36:inrequire':没有要加载的文件 - openssl (LoadError) /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 '来自 /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要求来自 /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:in 要求来自 /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 ' 来自 ruby​​gems/custom_require>:33:in require' 来自 rubygems/custom_require>:33:in在 require' 中进行救援 rubygems/custom_require>:29:in require' from extconf.rb:2:in ' Gem 文件将保留安装在 /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 当前不是 安装。您想安装它吗?

我回答“是”,它尝试(我认为失败)下载软件所需的任何必要依赖项。窗口标题是“安装 Gems”。就在该窗口关闭后,我立即收到了上述错误。

我需要做什么?

编辑: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:在 require' 中:没有这样的文件 从以下位置加载 -- ruby​​_core_source (LoadError):29:inrequire' 来自 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

I am trying to learn Ruby on Rails. I purchased Ruby Mine and installed it on Ubuntu. I followed the installation instructions and when I tried to debug my first project in RubyMine, I get this:

Error running Development: test001: Failed to install gems.

Following gems were not installed: linecache19 (0.5.12): Error
installing linecache19: 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': 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
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/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
rubygems/custom_require>:33:in rescue 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': 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
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/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:in require' from
rubygems/custom_require>:33:in
rescue 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

Now, just prior to this error, I was prompted with:

The gem ruby-debug-base19x required by the debugger is not currently
installed. Would you like to install it?

I responded "Yes", and it attempted (and I assume failed) to download whatever necessary dependencies the software needed. The window title was "Installing Gems". It was immediately after this window closed that I received the above error.

What do I need to do?

edit: 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/

edit #2 showing errors:

$ gem install ruby-debug-base19x Fetching: linecache19-0.5.12.gem
(100%) Building native extensions. This could take a while... ERROR:
Error installing ruby-debug-base19x: 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
:29:in require': no such file
to load -- ruby_core_source (LoadError) from
<internal:lib/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/gems/linecache19-0.5.12
for inspection. Results logged to
/home/stormkiernan/.rvm/gems/ruby-1.9.2-p290/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

姐不稀罕 2024-12-13 04:01:45

在遇到这个问题之前,我遇到了同样的问题并尝试了很多选择:
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 ruby​​debug-19 和开放式SSL:

*** extconf.rb failed ***
custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)

I had the same problems and tried so many options before I came across this:
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

This resolves the issue with linecache19 rubydebug-19 and openssl:

*** extconf.rb failed ***
custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
孤芳又自赏 2024-12-13 04:01:45

请从命令提示符执行以下操作:

sudo gem install ruby-debug-base19x

如果您使用 rvm(推荐):

gem install ruby-debug-base19x

编辑:首先键入:rvm --default use 1.9.2

Do the following from a command prompt instead:

sudo gem install ruby-debug-base19x

of if you're using rvm (recommended):

gem install ruby-debug-base19x

EDITED: type this first: rvm --default use 1.9.2

不念旧人 2024-12-13 04:01:45

我已经在 ubuntu 中运行以下命令解决了这个错误:

$ sudo apt-get install ruby-dev

I've solved this error running the following command in ubuntu:

$ sudo apt-get install ruby-dev
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文