0

信頼性の低いハードウェアでさまざまな程度のエラーが発生したため、Ruby on Rails を新しいラップトップで実行することにしました。

RVM と Rails 3 経由で Ruby 1.9.2 p320 をインストールしましたrails new blog

...
         run  bundle install
/home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
        from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/https.rb:92:in `<top (required)>'
        from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:447:in `ssl'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:216:in `connection_for'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:358:in `request'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:149:in `fetch'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:177:in `fetch_dependency_remote_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:135:in `fetch_remote_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:73:in `specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:234:in `block in remote_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `each'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `remote_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:165:in `fetch_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:70:in `specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:191:in `block (2 levels) in index'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `each'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `block in index'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/index.rb:9:in `build'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:184:in `index'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:178:in `resolve'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/bin/bundle:14:in `block in <main>'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/bin/bundle:14:in `<main>'
Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal error has occurred. Please see the Bundler 
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! 

およびrake db:create:

Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.

最後に、bundle install から:

Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal error has occurred. Please see the Bundler 
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! 
/home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
        from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/https.rb:92:in `<top (required)>'
        from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/gossfunkel/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:447:in `ssl'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:216:in `connection_for'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:358:in `request'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:149:in `fetch'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:177:in `fetch_dependency_remote_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:135:in `fetch_remote_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/fetcher.rb:73:in `specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:234:in `block in remote_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `each'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `remote_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:165:in `fetch_specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/source.rb:70:in `specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:191:in `block (2 levels) in index'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `each'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `block in index'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/index.rb:9:in `build'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:184:in `index'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:178:in `resolve'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/bin/bundle:14:in `block in <top (required)>'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.1/bin/bundle:14:in `<top (required)>'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/bin/bundle:23:in `load'
        from /home/gossfunkel/.rvm/gems/ruby-1.9.2-p320@global/bin/bundle:23:in `<main>'

私は明らかに Rails の経験が浅いので、何が起こっているのかわかりません。どうしても実行できなかったのはこれが初めてではありません。

編集:これが私のGemfileです。これは単なるデフォルトです:

source 'https://rubygems.org'

gem 'rails', '3.2.8'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'
4

1 に答える 1

1

openSSL (少なくとも開発ライブラリ) がインストールされていないようです。

rvm pkg install openssl

rvm pkg install iconv

rvm remove 1.9.2

rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr

sudo apt-get install libssl-dev または、 rvm を再インストールすることもできます。

詳細については、次を参照してください: https://rvm.io/packages/openssl/ & Rails 3 - ロードするファイルはありません -- openssl

于 2013-02-03T18:19:18.550 に答える