Rails控制台无法找到已安装的gem [英] rails console fails to find installed gem

查看:53
本文介绍了Rails控制台无法找到已安装的gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ bundle install |grep chunk
Using chunky_png 1.3.3
$ rails c
Could not find chunky_png-1.3.3 in any of the sources
Run `bundle install` to install missing gems.

我尝试从rvm gemset中删除所有gem并重新运行bundle两次,但是救命。有任何想法吗?

I've tried removing all gems from the rvm gemset and re-running bundle twice, doesn't help. Any ideas?

这是在Ubuntu 13.10计算机上。

This is on an Ubuntu 13.10 machine. Same code base on my Mac OSX machine works fine.

推荐答案

通常,发生这种情况是因为Bundler和Rails使用不同版本的红宝石。要进行检查,请运行 bundle env rails runner'puts RUBY_VERSION'

Usually, this happens because Bundler and Rails are running with different versions of Ruby. To check, run bundle env and rails runner 'puts RUBY_VERSION'.

如果仍不能解决问题,请将两者的输出添加到您的问题中。

If that doesn't solve it, please add the output of both to your question.

这篇关于Rails控制台无法找到已安装的gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆