ruby-on-rails – 安装rails时找不到文件’lib’

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 安装rails时找不到文件’lib’前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
像这样的东西:
gem install rails
Fetching: activesupport-3.0.10.gem (100%)
Fetching: builder-2.1.2.gem (100%)
WARNING: builder-2.1.2 has an invalid nil value for @cert_chain
Fetching: i18n-0.5.0.gem (100%)
Fetching: activemodel-3.0.10.gem (100%)
Fetching: rack-1.2.3.gem (100%)
Fetching: rack-test-0.5.7.gem (100%)
Fetching: rack-mount-0.6.14.gem (100%)
Fetching: tzinfo-0.3.29.gem (100%)
Fetching: abstract-1.0.0.gem (100%)
WARNING: abstract-1.0.0 has an invalid nil value for @cert_chain
Fetching: erubis-2.6.6.gem (100%)
Fetching: actionpack-3.0.10.gem (100%)
Fetching: arel-2.0.10.gem (100%)
Fetching: activerecord-3.0.10.gem (100%)
Fetching: activeresource-3.0.10.gem (100%)
Fetching: mime-types-1.16.gem (100%)
Fetching: polyglot-0.3.2.gem (100%)
Fetching: treetop-1.4.10.gem (100%)
Fetching: mail-2.2.19.gem (100%)
Fetching: actionmailer-3.0.10.gem (100%)
Fetching: thor-0.14.6.gem (100%)
Fetching: railties-3.0.10.gem (100%)
Fetching: bundler-1.0.18.gem (100%)
Fetching: rails-3.0.10.gem (100%)
Successfully installed activesupport-3.0.10
Successfully installed builder-2.1.2
Successfully installed i18n-0.5.0
Successfully installed activemodel-3.0.10
Successfully installed rack-1.2.3
Successfully installed rack-test-0.5.7
Successfully installed rack-mount-0.6.14
Successfully installed tzinfo-0.3.29
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.6
Successfully installed actionpack-3.0.10
Successfully installed arel-2.0.10
Successfully installed activerecord-3.0.10
Successfully installed activeresource-3.0.10
Successfully installed mime-types-1.16
Successfully installed polyglot-0.3.2
Successfully installed treetop-1.4.10
Successfully installed mail-2.2.19
Successfully installed actionmailer-3.0.10
Successfully installed thor-0.14.6
Successfully installed railties-3.0.10
Successfully installed bundler-1.0.18
Successfully installed rails-3.0.10
23 gems installed
Installing ri documentation for activesupport-3.0.10...
Installing ri documentation for builder-2.1.2...
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README,skipping
Installing ri documentation for i18n-0.5.0...
Installing ri documentation for activemodel-3.0.10...
Installing ri documentation for rack-1.2.3...
Installing ri documentation for rack-test-0.5.7...
Installing ri documentation for rack-mount-0.6.14...
Installing ri documentation for tzinfo-0.3.29...
Installing ri documentation for abstract-1.0.0...
Installing ri documentation for erubis-2.6.6...
Installing ri documentation for actionpack-3.0.10...
Installing ri documentation for arel-2.0.10...
Installing ri documentation for activerecord-3.0.10...
Installing ri documentation for activeresource-3.0.10...
Installing ri documentation for mime-types-1.16...
Installing ri documentation for polyglot-0.3.2...
Installing ri documentation for treetop-1.4.10...
Installing ri documentation for mail-2.2.19...
Installing ri documentation for actionmailer-3.0.10...
Installing ri documentation for thor-0.14.6...
Installing ri documentation for railties-3.0.10...
Installing ri documentation for bundler-1.0.18...
Installing ri documentation for rails-3.0.10...
file 'lib' not found
Installing RDoc documentation for activesupport-3.0.10...
Installing RDoc documentation for builder-2.1.2...
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README,skipping
Installing RDoc documentation for i18n-0.5.0...
Installing RDoc documentation for activemodel-3.0.10...
Installing RDoc documentation for rack-1.2.3...
Installing RDoc documentation for rack-test-0.5.7...
Installing RDoc documentation for rack-mount-0.6.14...
Installing RDoc documentation for tzinfo-0.3.29...
Installing RDoc documentation for abstract-1.0.0...
Installing RDoc documentation for erubis-2.6.6...
Installing RDoc documentation for actionpack-3.0.10...
Installing RDoc documentation for arel-2.0.10...
Installing RDoc documentation for activerecord-3.0.10...
Installing RDoc documentation for activeresource-3.0.10...
Installing RDoc documentation for mime-types-1.16...
Installing RDoc documentation for polyglot-0.3.2...
Installing RDoc documentation for treetop-1.4.10...
Installing RDoc documentation for mail-2.2.19...
Installing RDoc documentation for actionmailer-3.0.10...
Installing RDoc documentation for thor-0.14.6...
Installing RDoc documentation for railties-3.0.10...
Installing RDoc documentation for bundler-1.0.18...
Installing RDoc documentation for rails-3.0.10...
file 'lib' not found

如果我运行rake db:migrate

它说:

............
    rake aborted!

stack level too deep

解决方法

试试这个 :
sudo gem install rails --no-ri --no-rdoc

如果你想安装RDoc使用:

sudo gem install rdoc-data
sudo rdoc-data --install
sudo gem rdoc --all --overwrite

如果那不起作用试试这个:

sudo apt-get install ruby-dev build-essential
原文链接:https://www.f2er.com/ruby/269718.html

猜你在找的Ruby相关文章