rake assets:预编译不工作总是显示:read':没有这样的文件或目录 - assets:precompile:all

时间:2013-09-24 11:39:19

标签: ruby-on-rails-3 asset-pipeline ruby-1.9.3 sprockets

我使用的是ubuntu 64位机器,rvm,ruby 1.9.3-p448,rails 3.2.13 而且我无法预编译资产。 我使用了以下命令,但总是得到同样的错误: -

  1. rake assets:预编译RAILS_ENV = production
  2. rake assets:precompile
  3. 捆绑exec rake资产:预编译
  4.  mymachine:~/mymachine-rails/prod$ bundle exec rake assets:precompile --trace
    DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails
    
         

    4.0。移出它们并将它们捆绑在Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。看到   发布说明了解更多信息:   http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。   (来自at   /家庭/ mymachine上/ mymachine上护栏/生产/ Rake文件:7)       弃用警告:您在供应商/插件中拥有Rails 2.3风格的插件!在Rails中将删除对这些插件的支持   4.0。移出它们并将它们捆绑在Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。看到   发布说明了解更多信息:   http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。   (来自at   /家庭/ mymachine上/ mymachine上护栏/生产/ Rake文件:7)       弃用警告:您在供应商/插件中拥有Rails 2.3风格的插件!在Rails中将删除对这些插件的支持   4.0。移出它们并将它们捆绑在Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。看到   发布说明了解更多信息:   http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。   (来自at   /家庭/ mymachine上/ mymachine上护栏/生产/ Rake文件:7)       弃用警告:您在供应商/插件中拥有Rails 2.3风格的插件!在Rails中将删除对这些插件的支持   4.0。移出它们并将它们捆绑在Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的应用程序中。看到   发布说明了解更多信息:   http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released。   (来自at   /家庭/ mymachine上/ mymachine上护栏/生产/ Rake文件:7)       **调用资产:预编译(first_time)       **执行资产:预编译       /home/mymachine/.rvm/rubies/ruby-1.9.3-p448/bin/ruby /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/bin/ruby_executable_hooks   assets:precompile:所有RAILS_ENV =生产RAILS_GROUPS = assets --trace       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/bin/ruby_executable_hooks:14:in   read': No such file or directory - assets:precompile:all (Errno::ENOENT) from /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/bin/ruby_executable_hooks:14:in ”       耙子流产了!       命令失败,状态为(1):[/ home / mymachine / .rvm / rubies / ruby​​-1.9.3-p448 / ...]       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/file_utils.rb:55:in   block in create_shell_runner' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in 称之为”       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in   sh' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/file_utils_ext.rb:37:in SH”       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/file_utils.rb:82:in   ruby' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/file_utils_ext.rb:37:in红宝石”       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/actionpack-3.2.13/lib/sprockets/assets.rake:12:in ruby_rake_task' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/actionpack-3.2.13/lib/sprockets/assets.rake:21:in invoke_or_reboot_rake_task'       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in block (2 levels) in <top (required)>' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/task.rb:236:in call'       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/task.rb:236:in   block in execute' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/task.rb:231:in 每个”       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/task.rb:231:in   invoke_with_call_chain'execute' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/task.rb:175:in 阻止       /home/mymachine/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in   mon_synchronize' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/task.rb:168:in invoke_with_call_chain'       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/task.rb:161:in   invoke' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:149:in invoke_task”       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:106:in   block (2 levels) in top_level' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:106:in 每个”       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:106:in   block in top_level' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:115:in run_with_threads'       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:100:in   top_level' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:78:in 阻止运行'       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:165:in   standard_exception_handling' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/lib/rake/application.rb:75:in 运行”       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/gems/rake-10.1.0/bin/rake:33:in   <top (required)>' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/bin/rake:19:in负载”       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/bin/rake:19:in <main>' /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/bin/ruby_executable_hooks:14:in eval'       /home/mymachine/.rvm/gems/ruby-1.9.3-p448@mymachine/bin/ruby_executable_hooks:14:in   `”       任务:TOP =&gt;资产:预编译

    宝石列表: -

    *** LOCAL GEMS ***
    
    actionmailer (3.2.13)
    actionpack (3.2.13)
    activemodel (3.2.13)
    activerecord (3.2.13)
    activeresource (3.2.13)
    activesupport (3.2.13)
    acts-as-taggable-on (2.4.1)
    acts_as_paranoid (0.4.2)
    angularjs-rails (1.0.7)
    arel (3.0.2)
    bcrypt-ruby (3.1.1)
    browser (0.2.0)
    builder (3.0.4)
    bundler (1.3.5)
    bundler-unload (1.0.2)
    cancan (1.6.10)
    chronic (0.9.1)
    climate_control (0.0.3)
    cocaine (0.5.1)
    coffee-rails (3.2.2)
    coffee-script (2.2.0)
    coffee-script-source (1.6.3)
    columnize (0.3.6)
    commonjs (0.2.6)
    couchrest (1.1.3)
    couchrest_model (1.1.2)
    daemons (1.1.9)
    debugger (1.6.1)
    debugger-linecache (1.2.0)
    debugger-ruby_core_source (1.2.3)
    devise (3.0.0)
    em-synchrony (1.0.3)
    erubis (2.7.0)
    eventmachine (1.0.3)
    execjs (1.4.0)
    executable-hooks (1.2.2)
    faraday (0.8.7)
    faye-websocket (0.6.2)
    hashie (2.0.5)
    hike (1.2.3)
    hiredis (0.4.5)
    httpauth (0.2.0)
    i18n (0.6.1)
    journey (1.0.4)
    jquery-rails (3.0.4)
    jquery-ui-rails (4.0.4)
    json (1.7.7)
    jwt (0.1.8)
    less (2.3.2)
    less-rails (2.3.3)
    libv8 (3.16.14.3 x86_64-linux, 3.11.8.17 x86_64-linux)
    localtunnel (0.3)
    magic_multi_connections (1.2.1)
    mail (2.5.4)
    masonry-rails (0.2.0)
    mime-types (1.23)
    mini_portile (0.5.1)
    multi_json (1.7.7)
    multipart-post (1.2.0)
    mysql2 (0.3.13)
    net-ssh (2.6.8)
    net-ssh-gateway (1.2.0)
    nokogiri (1.6.0)
    oauth (0.4.7)
    oauth2 (0.8.1)
    omniauth (1.1.4)
    omniauth-facebook (1.4.1)
    omniauth-google-oauth2 (0.2.0)
    omniauth-linkedin-oauth2 (0.0.2)
    omniauth-oauth (1.0.1)
    omniauth-oauth2 (1.1.1)
    omniauth-twitter (1.0.0)
    orm_adapter (0.4.0)
    paperclip (3.5.0)
    polyglot (0.3.3)
    rack (1.4.5)
    rack-cache (1.2)
    rack-offline (0.6.4)
    rack-ssl (1.3.3)
    rack-test (0.6.2)
    rails (3.2.13)
    railties (3.2.13)
    rake (10.1.0)
    rb-readline (0.4.2)
    rdoc (3.12.2)
    redis (3.0.4)
    ref (1.0.5)
    rest-client (1.6.7)
    rsolr (1.0.9)
    rubygems-bundler (1.3.2)
    rvm (1.11.3.8)
    sass (3.2.9)
    sass-rails (3.2.6)
    sprockets (2.2.2)
    swipe-rails (0.0.5)
    therubyracer (0.12.0, 0.11.4)
    thin (1.5.1)
    thor (0.18.1)
    tilt (1.4.1)
    time_diff (0.3.0)
    treetop (1.4.14)
    twitter-bootstrap-rails (2.2.7)
    tzinfo (0.3.37)
    uglifier (2.1.2)
    warden (1.2.3)
    websocket-driver (0.2.1)
    websocket-rails (0.4.9)
    whenever (0.8.4)
    will_paginate (3.0.4)
    

1 个答案:

答案 0 :(得分:1)

似乎是一个RVM怪癖。我使用rvm + ruby​​ 2.0.0-p247遇到了这个问题,这对我有用:

rvm ruby-2.0.0-p247@global do gem install executable-hooks