2013-02-03 34 views
0

我決定嘗試讓我的新筆記本電腦上運行的軌道上的紅寶石,因爲我試圖讓它在不太可靠的硬件上運行幾次,以各種程度的錯誤。Rails /創業板/捆綁軟件錯誤,在rails新和耙db:創建

我必須通過RVM安裝了Ruby 1.9.2 P320和Rails 3.下面是輸出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/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:447:in `ssl' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:216:in `connection_for' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:358:in `request' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/fetcher.rb:149:in `fetch' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/fetcher.rb:177:in `fetch_dependency_remote_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/fetcher.rb:135:in `fetch_remote_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/fetcher.rb:73:in `specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:234:in `block in remote_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `each' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `remote_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:165:in `fetch_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:70:in `specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:191:in `block (2 levels) in index' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `each' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `block in index' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/index.rb:9:in `build' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:184:in `index' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:178:in `resolve' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/bin/bundle:14:in `block in <main>' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors' 
     from /home/gossfunkel/.rvm/gems/[email protected]/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. 

,最後,從捆綁安裝:

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/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:447:in `ssl' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:216:in `connection_for' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/net/http/persistent.rb:358:in `request' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/fetcher.rb:149:in `fetch' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/fetcher.rb:177:in `fetch_dependency_remote_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/fetcher.rb:135:in `fetch_remote_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/fetcher.rb:73:in `specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:234:in `block in remote_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `each' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:232:in `remote_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:165:in `fetch_specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/source.rb:70:in `specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:191:in `block (2 levels) in index' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `each' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:188:in `block in index' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/index.rb:9:in `build' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:184:in `index' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:178:in `resolve' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/definition.rb:108:in `resolve_remotely!' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/installer.rb:81:in `run' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/installer.rb:14:in `install' 
     from /home/gossfunkel/.rvm/gems/rub[email protected]/gems/bundler-1.2.1/lib/bundler/cli.rb:230:in `install' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/bin/bundle:14:in `block in <top (required)>' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors' 
     from /home/gossfunkel/.rvm/gems/[email protected]/gems/bundler-1.2.1/bin/bundle:14:in `<top (required)>' 
     from /home/gossfunkel/.rvm/gems/[email protected]/bin/bundle:23:in `load' 
     from /home/gossfunkel/.rvm/gems/[email protected]/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' 
+0

你能告訴我們你的Gemfile? – jason328

+0

什麼是您的操作系統?你能證實OpenSSL是使用'openssl'安裝的嗎?你需要在你的系統上使用它,如果它不存在,你必須在得到它之後重新安裝Ruby。 –

+0

我運行Ubuntu 12.04,並確認存在openssl(位於'/ usr/bin/openssl'中)。我已經更新了這個問題以包含我的Gemfile。 – gossfunkel

回答

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 - no such file to load -- openssl