Rails资产预编译:Segmentation Fault + Ruby 1.9.3p392

时间:2013-02-27 20:53:55

标签: ruby ruby-on-rails-3 capistrano asset-pipeline

我正在使用Capistrano将简单的rails应用程序部署到SUSE服务器。在下面的钩子执行时部署

after "deploy:update_code" do
  run <<-CMD
  cd #{current_release} &&
   RAILS_ENV=#{rails_env} bundle exec rake assets:precompile --trace
  CMD
end

我得到以下长错误跟踪

        servers: ["application_server.com"]
    [application_server.com] executing command
*** [err :: application_server.com] ** Invoke assets:precompile (first_time)
*** [err :: application_server.com] ** Execute assets:precompile
*** [err :: application_server.com] /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby /opt/apps/myapplication.com/shared/bundle/ruby/1.9.1/bin/rake assets:precompile:all RAILS_ENV=devutility RAILS_GROUPS=assets --trace
*** [err :: application_server.com] 
*** [err :: application_server.com] /opt/apps/myapplication.com/shared/bundle/ruby/1.9.1/gems/therubyracer-0.11.4/lib/v8/init.so:
*** [err :: application_server.com] [BUG]
*** [err :: application_server.com] Segmentation fault
*** [err :: application_server.com] ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
*** [err :: application_server.com] -- Control frame information -----------------------------------------------
*** [err :: application_server.com] c:0054
*** [err :: application_server.com] p:-4755442
*** [err :: application_server.com] s:0156 b:0156
*** [err :: application_server.com] l:000155
*** [err :: application_server.com] d:000155
*** [err :: application_server.com] TOP
*** [err :: application_server.com] 
*** [err :: application_server.com] c:0053
*** [err :: application_server.com] p:----
*** [err :: application_server.com] s:0154 b:0154
*** [err :: application_server.com] l:000153
*** [err :: application_server.com] d:000153
*** [err :: application_server.com] CFUNC
*** [err :: application_server.com] :require
*** [err :: application_server.com] 
*** [err :: application_server.com] c:0052
*** [err :: application_server.com] p:0035
*** [err :: application_server.com] s:0150 b:0150
*** [err :: application_server.com] l:000149
*** [err :: application_server.com] d:000149
*** [err :: application_server.com] TOP

在我的GIST https://gist.github.com/ankit8898/5051531中找到完整的跟踪,Gemfile也存在于其中。

任何帮助都会非常有用。

2 个答案:

答案 0 :(得分:1)

我建议您从Gemfile中删除therubyracer并安装node.js作为您的javascript运行时,不要再担心它。

Therubyracer往往会遇到很多麻烦consumes too much memory

答案 1 :(得分:0)

也许尝试以前版本的therubyracer。在您的Gemfile中:

gem 'therubyracer', '0.11.3'