gpt4 book ai didi

ruby-on-rails - rails - 已安装 rails 但无法创建应用程序 "cannot load such file -- active_support"

转载 作者:数据小太阳 更新时间:2023-10-29 07:42:39 24 4
gpt4 key购买 nike

我做了sudo apt-get install rails,一切看起来都很好。

Reading package lists... Done
Building dependency tree
Reading state information...
...
Setting up ruby-actionmailer-2.3 (2.3.14-2) ...
Setting up ruby-activeresource-2.3 (2.3.14-1) ...
Setting up ruby-rails-2.3 (2.3.14-2) ...
Setting up rails (2.3.14.1) ...
Setting up ruby1.8-dev (1.8.7.352-2ubuntu0.1) ...

但是现在当我尝试做的时候

rails 新测试

我得到 无法加载这样的文件 -- active_support (LoadError)

最佳答案

我不建议尝试通过 aptitude 加载 rails,我会使用 RubyGems .然后只需运行 gem install rails,并根据需要传递特定版本。

例如,aptitude 正试图为您提供 Rails 2.3,而 Rails 目前是 3.2 版。您运行的命令 rails new test 是 rails 3 版本。在 Rails 2 中,它将是 script/rails ... something.

具体可以试试:

$ sudo apt-get remove rails  # remove the previous install attempt of 2.3  
$ gem install rails # Install rails version 3+ (3.2 in this case).

关于ruby-on-rails - rails - 已安装 rails 但无法创建应用程序 "cannot load such file -- active_support",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10290256/

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