在Mac OS X上安装滑轨

猛禽

我尝试在Mac OS X上安装Rails。我已经安装了ruby

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin11.4.2]

我检查是否已安装Rails:

$ rails -v 
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.

然后我运行:

$ sudo gem install rails
Password:
Successfully installed rails-4.0.0
Parsing documentation for rails-4.0.0
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/belongs_to.png, skipping
unable to convert "\xF4" from ASCII-8BIT to UTF-8 for guides/assets/images/book_icon.gif, skipping
unable to convert "\x91" from ASCII-8BIT to UTF-8 for guides/assets/images/bullet.gif, skipping
unable to convert "\xF5" from ASCII-8BIT to UTF-8 for guides/assets/images/chapters_icon.gif, skipping
unable to convert "\xF5" from ASCII-8BIT to UTF-8 for guides/assets/images/check_bullet.gif, skipping
unable to convert "\xF4" from ASCII-8BIT to UTF-8 for guides/assets/images/credits_pic_blank.gif, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/csrf.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/edge_badge.png, skipping
unable to convert "\x9E" from ASCII-8BIT to UTF-8 for guides/assets/images/favicon.ico, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/feature_tile.gif, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/footer_tile.gif, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/fxn.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/challenge.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/confirm_dialog.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/forbidden_attributes_for_new_post.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/form_with_errors.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/index_action_with_edit_link.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/new_post.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/post_with_comments.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/rails_welcome.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/routing_error_no_controller.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/routing_error_no_route_matches.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/show_action_for_posts.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/template_is_missing_posts_new.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/undefined_method_post_path.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/unknown_action_create_for_posts.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/getting_started/unknown_action_new_for_posts.png, skipping
unable to convert "\xF0" from ASCII-8BIT to UTF-8 for guides/assets/images/grey_bullet.gif, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/habtm.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/has_many.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/has_many_through.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/has_one.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/has_one_through.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/header_backdrop.png, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/header_tile.gif, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_html_safe.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_localized_pirate.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_translated_en.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_translated_pirate.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_translation_missing.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/i18n/demo_untranslated.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/1.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/10.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/11.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/12.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/13.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/14.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/15.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/2.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/3.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/4.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/5.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/6.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/7.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/8.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/callouts/9.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/caution.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/example.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/home.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/important.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/next.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/note.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/prev.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/tip.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/up.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/icons/warning.png, skipping
unable to convert "\xFF" from ASCII-8BIT to UTF-8 for guides/assets/images/jaimeiniesta.jpg, skipping
unable to convert "\xF5" from ASCII-8BIT to UTF-8 for guides/assets/images/nav_arrow.gif, skipping
unable to convert "\xFF" from ASCII-8BIT to UTF-8 for guides/assets/images/oscardelben.jpg, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/polymorphic.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/radar.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/rails4_features.png, skipping
unable to convert "\xFF" from ASCII-8BIT to UTF-8 for guides/assets/images/rails_guides_kindle_cover.jpg, skipping
unable to convert "\xEC" from ASCII-8BIT to UTF-8 for guides/assets/images/rails_guides_logo.gif, skipping
unable to convert "\x8C" from ASCII-8BIT to UTF-8 for guides/assets/images/rails_logo_remix.gif, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/session_fixation.png, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_grey.gif, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_info.gif, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_note.gif, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_red.gif, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_yellow.gif, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for guides/assets/images/tab_yellow.png, skipping
unable to convert "\xFF" from ASCII-8BIT to UTF-8 for guides/assets/images/vijaydev.jpg, skipping
1 gem installed

然后我重新运行rails -v

$ rails -v 
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.

结果相同。问题:我想念什么?

的附加信息rvm

$ rvm -v

rvm 1.21.10 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]

注意:我的Mac OS X是10.7.5,并且我的帐户具有管理员权限。当前目录是~(主目录)

更新:这是基于注释的输出:

$ gem -v
2.0.5
$ which gem
/Users/MyUserName/.rvm/rubies/ruby-2.0.0-p247/bin/gem

接下来我该怎么办?

slhck

正如我在评论中提及,首先确保这两个rubygem指向RVM安装的版本,而不是那些在/usr/bin

还要确保将新的Ruby用作默认值:

rvm --default use 2.0.0-p247

创建一个gemset将用于此Ruby版本的Gemset(称为):

rvm use 2.0.0-p247@gemset --create --default

然后将Rails安装到该Gemset:

gem install rails

这应该足以使用新rails版本。如果外壳不粘,请尝试重新启动它。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

在Mac OS X(Yosemite)上安装滑轨时遇到问题

来自分类Dev

在Mac OS X Mavericks上安装Agda

来自分类Dev

在Mac OS X上安装OpenCV

来自分类Dev

无法在Mac OS X上安装scipy

来自分类Dev

在Mac OS X上安装tesseract / pytesser

来自分类Dev

在Mac OS X上安装OCaml

来自分类Dev

在Mac OS X Sierra上安装Laravel

来自分类Dev

在无法启动Mac OS X的Mac上安装ubuntu 12.04

来自分类Dev

在无法启动Mac OS X的Mac上安装ubuntu 12.04

来自分类Dev

在Mac OS上安装MongoDB

来自分类Dev

在 Mac OS 上安装 PIL

来自分类Dev

如何在Elementary OS上安装滑轨?

来自分类Dev

如何使用Homebrew在Mac OS X 10.10.2上安装R?

来自分类Dev

如何在Mac OS X上安装Python libpcap模块

来自分类Dev

无法在Mac OS X Mavericks上安装Fay

来自分类Dev

在Mac OS X上使用pip安装pyopencv

来自分类Dev

无法在Mac OS X上使用NPM安装Cordova

来自分类Dev

在Mac OS X 10.9(Mavericks)上安装openCV 2.4.2

来自分类Dev

在MAC OS X 10.9上安装NLTK的真正困难

来自分类Dev

在Mac OS X上安装paper.js

来自分类Dev

无法在Mac OS X 10.9.5上安装uWSGI

来自分类Dev

在Mac OS X 10.9(Mavericks)上使用macports安装opencv

来自分类Dev

如何在Mac OS X Mavericks上安装OpenERP?

来自分类Dev

在Mac OS X上mongoimport安装在哪里

来自分类Dev

使用Homebrew在Mac OS X上安装libRmath

来自分类Dev

在Mac OS X上安装Nokogiri gem时出错

来自分类Dev

在Mac OS X Yosemite上安装pymssql时出错

来自分类Dev

在Mac OS X 10.9.5上安装Psycopg2

来自分类Dev

在Mac(OS X 10.11.1)上安装mrjob时出错