Rails 4.0.0 Ruby 2.0 therubyracer gem 安装错误

Posted

技术标签:

【中文标题】Rails 4.0.0 Ruby 2.0 therubyracer gem 安装错误【英文标题】:Rails 4.0.0 Ruby 2.0 therubyracer gem installation error 【发布时间】:2013-10-24 06:49:15 【问题描述】:

Ubuntu 12.04 LTS 精确32 3.2.0-23-generic-pae ruby 2.0.0p247(2013-06-27 修订版 41674)[i686-linux]

我创建了 Rails (4.0.0) 项目,在 Gemfile 中取消注释 gem 'therubyracer' 并运行 'bundle install'。

我得到这个错误:

Could not find gem 'therubyracer (~> 0.12) ruby' in the gems available on this machine. Run `bundle install` to install missing gems.

在 Gemfile 中添加 'execjs'、'libv8' 没有任何区别,并且可以以所有可能的组合再次卸载和安装这些 gem。

【问题讨论】:

【参考方案1】:

你可以试试bundle update,它会起作用的。

【讨论】:

【参考方案2】:

我已将 ruby​​racer 版本指定为 0.12.0,它工作正常!

【讨论】:

以上是关于Rails 4.0.0 Ruby 2.0 therubyracer gem 安装错误的主要内容,如果未能解决你的问题,请参考以下文章