RVM Ruby on Rails问题:OpenSSL

3

我创建Rails应用时遇到了一些错误,但是我不知道这些错误的含义或者如何修复它们。为了得到帮助,我将输出错误信息,而不是解释这些信息。以下是输出的内容:

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/

这与RVM、Bundler或Gems有关吗?我感到很困惑。

谢谢, Jim

1个回答

2

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

这里有一个RVM故障排除页面,应该能够帮到你:http://beginrescueend.com/packages/openssl/

简而言之:您需要安装openssl,然后卸载Ruby并重新编译。


4
那个链接现在已经失效了。 - Henry Collingridge

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接