【问题标题】:Rails 4.2 ActiveSupport ErrorRails 4.2 ActiveSupport 错误
【发布时间】:2015-01-17 16:58:45
【问题描述】:

我在 rails 4.2.0(非测试版)中使用命令时出错

rails g 

错误:

Could not find activesupport-4.2.0 in any of the sources
Run `bundle install` to install missing gems.

但运行 bundle install 我确实安装了 activesupport-4.2.0...

Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.2.0  
.....

这个命令

bundle exec show activesupport

错误

bundler: command not found: show
Install missing gem executables with `bundle install`

这个命令

bundle show activesupport 

输出

/home/todd/.rvm/gems/ruby-2.1.4@blog/gems/activesupport-4.2.0

运行

bundle exec rails g

给我与运行“rails g”相同的错误


echo $PATH | grep rvm

输出 /home/todd/.rvm/gems/ruby2.1.4@blog/bin:/home/todd/.rvm/gems/ruby2.1.4@global/bin:/home/todd/.rvm/rubies/ruby-2.1.4/bin:/home/todd/.rvm/bin:/home/todd/bin:/usr/local/bin/exercism:/usr/local/heroku/bin:/home/todd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

【问题讨论】:

  • 你试过bundle update吗?
  • 运行 bundle exec show activesupport 以查看您当前的版本
  • 我当然做了捆绑更新。 bundle exec show activesupport 给了我一个错误。 bundle shoe activesupport 为我提供了正确的路径。更新的问题
  • RVM 在您的路径中吗? echo $PATH
  • 是的。现在用输出更新问题

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


【解决方案1】:

好像您的 rails 可执行文件不是来自捆绑包,请尝试:

bundle exec rails g 

【讨论】:

  • 该命令也不起作用。更新了问题以包含我被要求运行的命令的输出
【解决方案2】:

我认为这是 rvm 路径问题或安装错误。我刚刚重新安装了应用程序并制作了一个新的 rvm gem。现在它就像一个魅力。感谢您的帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多