gpt4 book ai didi

ruby-on-rails - 捆绑安装未安装所有依赖项

转载 作者:行者123 更新时间:2023-12-04 07:29:39 25 4
gpt4 key购买 nike

我在 Mac OS X 上,当我运行 sudo bundle install 时,它会在目标机器上安装几个 gem:

Installing ptools (1.2.1) 
Using thor (0.14.6)
Using railties (3.0.5)
Using rails (3.0.5)
Installing rails_config (0.2.4)
Using shoulda (2.11.3)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
imac-cf:gnymbus apple$ rails console
Could not find rake-0.9.2 in any of the sources
imac-cf:gnymbus apple$ sudo gem install rake-0.9.2
ERROR: Could not find a valid gem 'rake-0.9.2' (>= 0) in any repository
imac-cf:gnymbus apple$ sudo gem install rake -v=0.9.2
Successfully installed rake-0.9.2
1 gem installed
Installing ri documentation for rake-0.9.2...
Installing RDoc documentation for rake-0.9.2...
imac-cf:gnymbus apple$ sudo gem install rake-0.9.2
^CERROR: Interrupted
imac-cf:gnymbus apple$ rails console
Could not find i18n-0.6.0 in any of the sources
imac-cf:gnymbus apple$ sduo gem install i18n -v=0.6.0
-bash: sduo: command not found
imac-cf:gnymbus apple$ sudo gem install i18n -v=0.6.0
Successfully installed i18n-0.6.0
1 gem installed
Installing ri documentation for i18n-0.6.0...
Installing RDoc documentation for i18n-0.6.0...

因此,可以安全地假设应用程序的依赖项已解决,并且一切准备就绪。但他们不是。

当我运行 rails 控制台时,我不断收到关于越来越多的未解决依赖项的输出:
imac-cf:gnymbus apple$ rails console
Could not find tzinfo-0.3.29 in any of the sources
imac-cf:gnymbus apple$ sudo gem install tzingo -v=0.3.29
ERROR: Could not find a valid gem 'tzingo' (= 0.3.29) in any repository
imac-cf:gnymbus apple$ sudo gem install tzinfo -v=0.3.29
Successfully installed tzinfo-0.3.29
1 gem installed
Installing ri documentation for tzinfo-0.3.29...
Installing RDoc documentation for tzinfo-0.3.29...
imac-cf:gnymbus apple$ rails console
Could not find polyglot-0.3.2 in any of the sources
imac-cf:gnymbus apple$ sudo gem install polyglot -v=0.3.2
Successfully installed polyglot-0.3.2
1 gem installed
Installing ri documentation for polyglot-0.3.2...
Installing RDoc documentation for polyglot-0.3.2...
imac-cf:gnymbus apple$ rails console
Could not find treetop-1.4.10 in any of the sources
imac-cf:gnymbus apple$ sudo gem install treetop -v=1.4.10
Successfully installed treetop-1.4.10
1 gem installed
Installing ri documentation for treetop-1.4.10...
Installing RDoc documentation for treetop-1.4.10...
imac-cf:gnymbus apple$ rails console
Could not find mail-2.2.19 in any of the sources
imac-cf:gnymbus apple$ sudo gem install mail -v=2.2.19
Successfully installed mail-2.2.19
1 gem installed
Installing ri documentation for mail-2.2.19...
Installing RDoc documentation for mail-2.2.19...
imac-cf:gnymbus apple$ rails console
Could not find addressable-2.2.6 in any of the sources

Rails 真的这么难吗?我真的必须手动安装依赖项,一个一个吗?我究竟做错了什么?

最佳答案

我用了

bundle update 

它更新了所有 Gemfiles 并安装了丢失的 gem。没有 sudo,因为使用 RVM

关于ruby-on-rails - 捆绑安装未安装所有依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7060069/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com