ruby​​发出OpenSSL

ruby​​发出OpenSSL

本文介绍了Rails上的RVM ruby​​发出OpenSSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建一个Rails应用程序时,我收到一些错误,我不知道它们是什么意思或如何解决它们。

 我不会解释我将输出发生的事情,而是认为这可能是获得此帮助的最佳方法: j3 @ j3:〜/ code / rails_projects $ rails new first_app 
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
创建Gemfile
创建应用程序
创建应用程序/ assets / images / rails.png
创建应用程序/资产/ javascripts / application.js
创建应用程序/资产/样式表/应用程序。 css
创建应用程序/ controllers / application_controller.rb
创建应用程序/助手/ application_helper.rb
创建应用程序/邮件程序
创建应用程序/模型
创建应用程序/ layouts / application.html.erb
创建应用程序/邮件程序/ .gitkeep
创建应用程序/模型/ .gitkeep
创建配置
创建配置/ routes.rb
创建config / application.rb
创建config / envi ronment.rb
创建配置/环境
创建配置/ environments / development.rb
创建配置/ environments / production.rb
创建config / environments / test.rb
创建config / initializers
创建config / initializers / backtrace_silencers.rb
创建config / initializers / inflections.rb
创建config / initializers / mime_types.rb
创建config / initializers / secret_token.rb
创建config / initializers / session_store.rb
创建config / initializers / wrap_parameters.rb
创建config / locales
创建config / locales / en.yml
create config / boot.rb
create config / database.yml
create db
create db / seeds.rb
create doc
create doc / README_FOR_APP
创建lib
创建lib /任务
创建lib / tasks / .gitkeep
创建lib /资产
创建lib / assets / .gitkee p
创建日志
创建日志/ .gitkeep
创建公共
创建公共/ 404.html
创建公共/ 422.html
创建公共/ 500 .html
创建public / favicon.ico
创建public / index.html
创建public / robots.txt
创建脚本
创建脚本/导轨
创建测试/灯具
创建测试/灯具/ .gitkeep
创建测试/功能
创建测试/功能/ .gitkeep
创建测试/集成
创建测试/集成/.gitkeep
创建测试/单元
创建测试/单元/ .gitkeep
创建测试/性能/ browsing_test.rb
创建测试/ test_helper.rb
创建tmp / cache
创建tmp / cache /资产
创建供应商/资产/ javascripts
创建供应商/资产/ javascripts / .gitkeep
创建供应商/资产/样式表
创建供应商/资产/风格heets / .gitkeep
创建供应商/插件
创建供应商/插件/ .gitkeep
运行软件包安装
/home/j3/.rvm/rubies/ruby-1.9.2- p290 / lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / custom_require.rb:36:在'require'中:没有要加载的文件 - openssl(LoadError)
from /home/j3/.rvm/rubies /ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in`require'
from /home/j3/.rvm/rubies/ruby-1.9。 2-p290 / lib / ruby​​ / 1.9.1 / net / https.rb:92:在<< top(required)>'
from /home/j3/.rvm/rubies/ruby-1.9。 2-p290 / lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / custom_require.rb:36:在'require'中
从/home/j3/.rvm/rubies/ruby-1.9.2-p290/lib /ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in`require'
from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/ 1.9.1 / ruby​​gems / remote_fetcher.rb:316:在`connection_for'
from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems /remote_fetcher.rb:368:in`re quest'
from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:203:in`fetch_http'
from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:231:in`fetch_path'
from / home / j3 / .rvm / rubies / ruby​​-1.9.2-p290 / lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / spec_fetcher.rb:265:在`load_specs'
from /home/j3/.rvm/ rubies / ruby​​-1.9.2-p290 / lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / spec_fetcher.rb:231:在`block in list'
from /home/j3/.rvm/rubies/ruby -1.9.2-p290 / lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / spec_fetcher.rb:227:在`each'
from /home/j3/.rvm/rubies/ruby-1.9.2- p290 / lib / ruby​​ / site_ruby / 1.9.1 / ruby​​gems / spec_fetcher.rb:227:在`list'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems /bundler-1.0.21/lib/bundler/source.rb:253:in`fetch_all_remote_specs'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler- 1.0.21 / lib / bundler / source.rb:234:在`block in remote_spec s'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:231:in`each'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:231:in`remote_specs'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:165:in`fetch_specs'
from / home /j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:70:in`specs'
from / home / j3 / .rvm / gems / ruby​​-1.9.2-p290 @ global / gems / bundler-1.0.21 / lib / bundler / definition.rb:159:在'block(2 levels)in index'
from / home /j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:158:in`each'
from / home / j3 / .rvm / gems / ruby​​-1.9.2-p290 @ global / gems / bundler-1.0.21 / lib / bundler / definition.rb:158:在'block in index'
from / home / j3 /。 rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/index.rb:7:在`build'
from /home/j3/.rvm /gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:157:in`index'
from /home/j3/.rvm/gems/ ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:151:在'resolve'
from /home/j3/.rvm/gems/ruby-1.9 .2-p290 @ global / gems / bundler-1.0.21 / lib / bundler / definition.rb:90:在`specs'中
from /home/j3/.rvm/gems/ruby-1.9.2- p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:85:在`resolve_remotely!'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@ global / gems / bundler-1.0.21 / lib / bundler / installer.rb:43:在'run'中
从/home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems /bundler-1.0.21/lib/bundler/installer.rb:8:in`install'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler- 1.0.21 / lib / bundler / cli.rb:219:在`install'中
从/home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21 /lib/bundler/vendor/thor/task.rb:22:in`run'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1 .0.21 / lib / bundler / vendor / thor / invocation.rb:118:在`invoke_task'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler- 1.0.21 / lib / bundler / vendor / thor.rb:263:在`dispatch'
from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0 .21 / lib / bundler / vendor / thor / base.rb:386:在'start'
从/home/j3/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0。 21 / bin / bundle:13:在< main>'
中获取https://rubygems.org/的源索引

这是否与RVM或Bundler或Gems有关?或者?我很困惑。



谢谢,
jim

解决方案

看起来Ruby并没有使用openssl进行编译。



以下是一个RVM故障排除页面,它有助于:

tl; dr - 您需要安装openssl,然后卸载Ruby并重新编译。


When I create a Rails app I am getting some errors and I have no idea what they mean or how to fix them. Instead of explaining I am going to output what is happening, I think this might be the best approach to getting help with this:

j3@j3:~/code/rails_projects$ rails new first_app
      create
      create  README.rdoc
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      create  app/assets/images/rails.png
      create  app/assets/javascripts/application.js
      create  app/assets/stylesheets/application.css
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/mailers
      create  app/models
      create  app/views/layouts/application.html.erb
      create  app/mailers/.gitkeep
      create  app/models/.gitkeep
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/secret_token.rb
      create  config/initializers/session_store.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  doc
      create  doc/README_FOR_APP
      create  lib
      create  lib/tasks
      create  lib/tasks/.gitkeep
      create  lib/assets
      create  lib/assets/.gitkeep
      create  log
      create  log/.gitkeep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/index.html
      create  public/robots.txt
      create  script
      create  script/rails
      create  test/fixtures
      create  test/fixtures/.gitkeep
      create  test/functional
      create  test/functional/.gitkeep
      create  test/integration
      create  test/integration/.gitkeep
      create  test/unit
      create  test/unit/.gitkeep
      create  test/performance/browsing_test.rb
      create  test/test_helper.rb
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor/assets/javascripts
      create  vendor/assets/javascripts/.gitkeep
      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.gitkeep
      create  vendor/plugins
      create  vendor/plugins/.gitkeep
         run  bundle install
/home/j3/.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/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/https.rb:92:in `<top (required)>'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:316:in `connection_for'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:368:in `request'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:203:in `fetch_http'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:231:in `fetch_path'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:265:in `load_specs'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:231:in `block in list'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:227:in `each'
    from /home/j3/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:227:in `list'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:253:in `fetch_all_remote_specs'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:234:in `block in remote_specs'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:231:in `each'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:231:in `remote_specs'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:165:in `fetch_specs'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:70:in `specs'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:159:in `block (2 levels) in index'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:158:in `each'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:158:in `block in index'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/index.rb:7:in `build'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:157:in `index'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:151:in `resolve'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:90:in `specs'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:85:in `resolve_remotely!'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/installer.rb:43:in `run'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/installer.rb:8:in `install'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/cli.rb:219:in `install'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'
    from /home/j3/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/bin/bundle:13:in `<main>'
Fetching source index for https://rubygems.org/

Does this have to do with RVM or Bundler or Gems or??? I am confused.

thanks,jim

解决方案

It looks like Ruby was not compiled with openssl.

Here's an RVM troubleshooting page that should help: http://beginrescueend.com/packages/openssl/

tl;dr -- you'll need to install openssl, then uninstall Ruby and recompile.

这篇关于Rails上的RVM ruby​​发出OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 18:20