ruby-on-rails – 为什么我无法使用gem install rails -v 4.0.0安装rails?

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 为什么我无法使用gem install rails -v 4.0.0安装rails?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我已经在GNU / Linux上安装了:

rvm 1.23.16 (stable) by Wayne E. Seguin,Michal Papis [https://rvm.io/]
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]

我显然在我的系统中拥有所有宝石,但是当我运行命令时:gem install rails -v 4.0.0它表明安装了一个gem.但是Rails还没有安装.

当我使用gem install rails -v 4.0.0或gem install rails –version = 4.0时
发生在:

  1. Parsing documentation for rails-4.0.0
  2. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/belongs_to.png,skipping
  3. unable to convert "\xF4" from ASCII-8BIT to UTF-8 for guides/assets/images/book_icon.gif,skipping
  4. unable to convert "\x91" from ASCII-8BIT to UTF-8 for guides/assets/images/bullet.gif,skipping
  5. unable to convert "\xF5" from ASCII-8BIT to UTF-8 for guides/assets/images/chapters_icon.gif,skipping
  6. unable to convert "\xF5" from ASCII-8BIT to UTF-8 for guides/assets/images/check_bullet.gif,skipping
  7. unable to convert "\xF4" from ASCII-8BIT to UTF-8 for guides/assets/images/credits_pic_blank.gif,skipping
  8. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/csrf.png,skipping
  9. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/edge_badge.png,skipping
  10. unable to convert "\x9E" from ASCII-8BIT to UTF-8 for guides/assets/images/favicon.ico,skipping
  11. unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/feature_tile.gif,skipping
  12. unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/footer_tile.gif,skipping
  13. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/fxn.png,skipping
  14. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/challenge.png,skipping
  15. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/confirm_dialog.png,skipping
  16. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/forbidden_attributes_for_new_post.png,skipping
  17. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/form_with_errors.png,skipping
  18. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/index_action_with_edit_link.png,skipping
  19. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/new_post.png,skipping
  20. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/post_with_comments.png,skipping
  21. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/rails_welcome.png,skipping
  22. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/routing_error_no_controller.png,skipping
  23. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/routing_error_no_route_matches.png,skipping
  24. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/show_action_for_posts.png,skipping
  25. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/template_is_missing_posts_new.png,skipping
  26. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/undefined_method_post_path.png,skipping
  27. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/unknown_action_create_for_posts.png,skipping
  28. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/unknown_action_new_for_posts.png,skipping
  29. unable to convert "\xF0" from ASCII-8BIT to UTF-8 for guides/assets/images/grey_bullet.gif,skipping
  30. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/habtm.png,skipping
  31. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/has_many.png,skipping
  32. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/has_many_through.png,skipping
  33. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/has_one.png,skipping
  34. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/has_one_through.png,skipping
  35. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/header_backdrop.png,skipping
  36. unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/header_tile.gif,skipping
  37. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_html_safe.png,skipping
  38. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_localized_pirate.png,skipping
  39. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_translated_en.png,skipping
  40. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_translated_pirate.png,skipping
  41. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_translation_missing.png,skipping
  42. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_untranslated.png,skipping
  43. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/1.png,skipping
  44. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/10.png,skipping
  45. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/11.png,skipping
  46. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/12.png,skipping
  47. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/13.png,skipping
  48. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/14.png,skipping
  49. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/15.png,skipping
  50. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/2.png,skipping
  51. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/3.png,skipping
  52. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/4.png,skipping
  53. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/5.png,skipping
  54. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/6.png,skipping
  55. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/7.png,skipping
  56. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/8.png,skipping
  57. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/9.png,skipping
  58. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/caution.png,skipping
  59. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/example.png,skipping
  60. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/home.png,skipping
  61. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/important.png,skipping
  62. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/next.png,skipping
  63. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/note.png,skipping
  64. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/prev.png,skipping
  65. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/tip.png,skipping
  66. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/up.png,skipping
  67. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/warning.png,skipping
  68. unable to convert "\xFF" from ASCII-8BIT to UTF-8 for guides/assets/images/jaimeiniesta.jpg,skipping
  69. unable to convert "\xF5" from ASCII-8BIT to UTF-8 for guides/assets/images/nav_arrow.gif,skipping
  70. unable to convert "\xFF" from ASCII-8BIT to UTF-8 for guides/assets/images/oscardelben.jpg,skipping
  71. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/polymorphic.png,skipping
  72. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/radar.png,skipping
  73. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/rails4_features.png,skipping
  74. unable to convert "\xFF" from ASCII-8BIT to UTF-8 for guides/assets/images/rails_guides_kindle_cover.jpg,skipping
  75. unable to convert "\xEC" from ASCII-8BIT to UTF-8 for guides/assets/images/rails_guides_logo.gif,skipping
  76. unable to convert "\x8C" from ASCII-8BIT to UTF-8 for guides/assets/images/rails_logo_remix.gif,skipping
  77. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/session_fixation.png,skipping
  78. unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_grey.gif,skipping
  79. unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_info.gif,skipping
  80. unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_note.gif,skipping
  81. unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_red.gif,skipping
  82. unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_yellow.gif,skipping
  83. unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_yellow.png,skipping
  84. unable to convert "\xFF" from ASCII-8BIT to UTF-8 for guides/assets/images/vijaydev.jpg,skipping
  85. 1 gem installed

如何使用RVM安装Rails 4.0.0?

解决方法

在计算机上安装Rails文档时,将创建这些错误消息.我发现有两个Rails问题讨论这个问题: #9590#11814.

这最终是an issue with rdoc and ruby 2.0 fixed但尚未发布rdoc版本.

有几种方法可以解决这个问题,我按照我可能尝试的顺序列出它们:

>不要使用rails gem安装文档;而不是运行gem install rails执行gem install rails –no-rdoc –no-ri.我几乎没有使用内置文档,所以我实际上在我的〜/ .gemrc文件中有gem:–no-ri –no-rdoc,因此永远不会为任何gem安装文档.
>在#1中安装没有文档的rails,但是然后使用rdoc和–exclude =’.dat’标志手动构建文档,比如rdoc –exclude =’.dat’activesupport / lib来构建activesupport文档,as recommended in this comment.
>在晚于ceb81dd11的提交中从github安装rdoc.在Gemfile中使用bundler的git或github选项可以很容易,但是还有其他原因尚未发布新版本,因此可能存在错误.

猜你在找的Ruby相关文章