rails 3.2.2捆绑错误

时间:2012-03-14 16:42:01

标签: ruby-on-rails bundle ruby-1.9.3

之前我正在使用以下rails config:

RVM
ruby 1.9.2-p180
rails 3.0.10
Fedora 16

最近我尝试在单独的gemset中安装ruby 1.9.3然后使用rails 3.2.2。安装宝石是好的。但是,当我尝试创建一个新的rails应用程序时出现此错误,我收到此错误: -

[puneet@puneet ~]$ rails new sample-app -d=mysql
      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/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-linux/openssl.so: undefined symbol: d2i_ECPKParameters - /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/x86_64-linux/openssl.so (LoadError)
    from /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/openssl.rb:17:in `<top (required)>'
    from /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/https.rb:22:in `<top (required)>'
    from /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/puneet/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/vendor/net/http/persistent.rb:447:in `ssl'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/vendor/net/http/persistent.rb:216:in `connection_for'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/vendor/net/http/persistent.rb:358:in `request'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/fetcher.rb:135:in `fetch'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/fetcher.rb:162:in `fetch_dependency_remote_specs'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/fetcher.rb:122:in `fetch_remote_specs'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/fetcher.rb:70:in `specs'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/source.rb:234:in `block in remote_specs'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/source.rb:232:in `each'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/source.rb:232:in `remote_specs'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/source.rb:165:in `fetch_specs'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/source.rb:70:in `specs'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/definition.rb:205:in `block (2 levels) in index'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/definition.rb:202:in `each'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/definition.rb:202:in `block in index'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/index.rb:9:in `build'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/definition.rb:198:in `index'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/definition.rb:192:in `resolve'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/definition.rb:127:in `specs'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/definition.rb:122:in `resolve_remotely!'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/installer.rb:48:in `run'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/installer.rb:12:in `install'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/cli.rb:220:in `install'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/vendor/thor.rb:263:in `dispatch'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/lib/bundler/vendor/thor/base.rb:386:in `start'
    from /home/puneet/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.0/bin/bundle:13:in `<main>'
Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks!

我尝试了rails 3.2.1并且结果相同。然而,当我尝试使用带有ruby-1.9.2-p180的rails 3.2.1时,它变得顺畅。

感谢任何帮助!!

1 个答案:

答案 0 :(得分:0)

rvm正在捡起它的全球红宝石和宝石;宝石可能需要更新才能与ruby兼容。一个简单的解决方案可能只是运行bundle update以获取最新版本的gem和依赖项。

您应该首先首先更新gem系统gem update --system。而你正在rvm get stable更新rvm。

rvm提供了一个更优雅的解决方案,创建了一个特定于ruby和rails版本的命名gemset(不仅仅是@global)。有关一般概念,请参阅http://beginrescueend.com/gemsets/basics/

然后在项目目录中创建一个.rvmrc文件,以确保您始终处于应用期望的所有版本。 http://beginrescueend.com/workflow/rvmrc/

这是在同一系统上拥有多个版本的ruby,rails(和依赖gems)的好方法。