新手问题 rails s 报错 Could not find erubis

easonlovejiven · February 26, 2015 · Last by jijin replied at February 27, 2015 · 2892 hits

新建了一个 web 项目但执行 rails s 命令时出现: You're using Rubygems 1.8.23 with Spring. Upgrade to at least Rubygems 2.1.0 and run gem pristine --all for better startup performance. Could not find erubis-2.7.0 in any of the sources Run bundle install to install missing gems. 求解

error message 已经给你解决方案了呀

楼主已经自问自答了

#1 楼 @h_minghe 不满你说对于我这种刚毕业的读不懂答案啊

#3 楼 @easonlovejiven

Could not find erubis-2.7.0 in any of the sources Run bundle install to install missing gems.

这还不够明白?

#4 楼 @libuchao 不太懂意思,不知道改哪,求解

#6 楼 @Rei 嗯嗯,我知道是这个错可不知道怎样改啊,知道应该是修改 Gemfile 文件里的参数,但不知道怎样去修改

运行 bundle install 来安装缺少的宝石 运行 bundle install 来安装缺少的 运行 bundle install 来安装 运行 bundle install

#8 楼 @Rei 已经运行过了,还是不行,实在没办法了

#9 楼 @easonlovejiven bundle install 运行后是否有错误呢? 劝 lz 先补补英文吧,起码那些 (rails 开发中) 常见的单词一个一个查出来记住。

看看 bundle install 运行后的打印 发现erubis了么

终端 gem list erubis 看看有没有安装了这个 gem,删除项目 Gemfile.lock 文件,重新 bundle install 试试。

You need to Sign in before reply, if you don't have an account, please Sign up first.