【问题标题】:rails - installed rails but can't create app "cannot load such file -- active_support"rails - 已安装 rails 但无法创建应用程序“无法加载此类文件 - active_support”
【发布时间】:2012-04-24 00:37:36
【问题描述】:

我做了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 新测试

我收到cannot load such file -- active_support (LoadError)

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 activesupport


    【解决方案1】:

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

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

    具体可以试试:

    $ 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).
    

    【讨论】:

      猜你喜欢
      • 2023-04-03
      • 2017-04-05
      • 2012-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-20
      • 1970-01-01
      • 2012-09-25
      相关资源
      最近更新 更多