0

我一直在使用 ruby​​ on rails 但我遇到了很多关于“runtimeerror”的问题我已经尝试安装了不止一次但我仍然无法解决问题,我已经搜索了更多次我会喜欢,但仍然一无所有。

每次我尝试做一个简单的 hello world(简单应用程序)时,都会出现运行时错误。例如,如果我尝试做:rails server,或者 gem 'therubyracer'等。我会得到 runtimeerror。我不知道问题可能是什么;这是我遇到的错误:

Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)


ERROR:  While executing gem ... (RuntimeError)
Unknown command therubyracer

我希望你们能帮助我解决这个问题,这样我就可以继续并开始编程:) 提前谢谢!

顺便说一句,这是我目前正在使用的所有内容的版本:

ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

rvm 1.15.9 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

Rails 3.2.8

编辑,也许我应该注意我按照本教程安装 RoR:https ://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts -带有 rvm 的精确穿山甲

4

1 回答 1

2

gem 'therubyracer'进入您的 Gemfile,而不是您的外壳。一定要bundle install在更改您的 Gemfile 之后。

于 2012-09-21T21:53:29.490 回答