加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

rails 3.1.0和ruby 1.9.2中的javascript运行时.无法处理heroku.

发布时间:2020-12-17 03:35:12 所属栏目:百科 来源:网络整理
导读:请帮忙,这是我的学习项目.它在本地工作但不在线: 您好,据说我不需要像rails 3.1.0中的“the rubyracer”这样的特殊宝石 但它写在“heroku日志”中: 2011-10-04T23:15:30+00:00 app[web.1]: ActionView::Template::Error (Could not find a JavaScript runt
请帮忙,这是我的学习项目.它在本地工作但不在线:
您好,据说我不需要像rails 3.1.0中的“the rubyracer”这样的特殊宝石
但它写在“heroku日志”中:

2011-10-04T23:15:30+00:00 app[web.1]: ActionView::Template::Error (Could not fin
d a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of
available runtimes.
2011-10-04T23:15:30+00:00 app[web.1]:   (in /app/app/assets/javascripts/rails.js
)):....

我试图安装“therubyracer”,但我安装错误

C:projlagp>gem install therubyracer
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
        ERROR: Failed to build gem native extension.

        C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
checking for main() in -lpthread... no
creating Makefile

make
C:/RailsInstaller/Ruby1.9.2/bin/ruby -e "puts 'EXPORTS','Init_v8'"  > v8-i386-m
ingw32.def
g++ -I. -IC:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.2/li
b/libv8/v8/include -IC:/RailsInstaller/Ruby1.9.2/include/ruby-1.9.1/i386-mingw32.....

我也编译:true和precompiled

这是我在github中的应用程序:https://github.com/EnotPoloskun/lagp如果你有时间看看,我浪费了2天这个问题(
所以我不知道该怎么做(
提前致谢

解决方法

我在Heroku上使用Rails 3.1和资产管道,以及我的gemfile中的资产组;

group :production do
 gem 'therubyracer-heroku'
end

这似乎是你所缺少的,

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读