Rails 4.2 ActiveSupport错误

时间:2015-01-17 16:58:46

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

我在使用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

2 个答案:

答案 0 :(得分:1)

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

bundle exec rails g 

答案 1 :(得分:1)

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