Rails rake资产:编译application.css.scss时预编译失败

时间:2014-09-14 17:31:32

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

我有一个rails版本3.2.17应用程序我试图在本地运行,当我运行rails服务器时 然后点击根页我得到一个错误,

Sprockets::FileNotFound at /
couldn't find file 'jquery.Jcrop' 

for application.css.scss

因此,在尝试重新编译资产以解决问题后,我收到一条错误消息

rake aborted!
Sprockets::FileNotFound: couldn't find file 'plupload.full'

for application.js

跑完后

    捆绑exec rake资产:预编译     rake资产:预编译     rake assets:precompile:all 没有一个工作并抛出相同的错误。

我正在使用Sprockets 2.2.2这似乎是个问题,任何想法都可能出错?

已编辑:包括application.js,application.css.scss和根页

的application.js

//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require jquery.validate
//= require jquery.validate.defaults
//= require plupload.full
//= require jquery.Jcrop
//= require fancybox
//= require flowplayer.min
//= require player
//= require scripts
//= require lessons
//= require practices
//= require profiles
//= require orders
//= require_tree ./theme
//= require devise

application.css.scss

//= require theme/bootstrap
//= require theme/accordian
//= require theme/alt_footer
//= require theme/docs
//= require theme/prettyPhoto
//= require theme/slider
//= require theme/socialist
//= require theme/timeline
//= require theme/zocial

//= require jquery.Jcrop
//= require fix_thumbnails
//= require fancybox
//= require flowplayer.skin
//= require player
//= require styles

//= require devise
//= require pages
//= require lessons
//= require home
//= require practices
//= require profiles
//= require order_items
//= require orders

//= require fontello
//= require picons

root application.html.haml

%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %title= content_for?(:page_title) ? yield(:page_title) : 'Tweak'
    = csrf_meta_tags
    / Le HTML5 shim, for IE6-8 support of HTML elements
    /[if lt IE 9]
      = javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js'
    = stylesheet_link_tag 'application', :media => 'all'
    = favicon_link_tag 'favicon.png'
    %link{href: "http://fonts.googleapis.com/css?family=Lato:300,400|Montserrat", rel: "stylesheet", type: "text/css"}/

  %body.full-layout
    .body-wrapper
      .yamm.navbar.basic.default
        .navbar-header
          .container
            .basic-wrapper
              .dropdown
                %a.btn.responsive-menu.pull-right.dropdown-toggle#icon-bar{ data: {toggle: "dropdown", target: "#"}}
                  %i.icon-menu-1
                %ul.dropdown-menu{role: 'menu', aria: {labelledby:"icon-bar"}}
                  = render 'shared/primary_links'

              = link_to logo_image_tag, user_signed_in? ? my_lessons_path : root_path, class: "navbar-brand"
            .collapse.navbar-collapse.pull-right
              %ul.nav.navbar-nav
                = render 'shared/primary_links'
            %ul.dropdown-menu{role: 'menu', aria: {labelledby:"icon-bar"}}
              = render 'shared/primary_links'
      = render 'shared/messages'
      = yield
      = render 'shared/footer'

    = render 'shared/auth_modals'
    /
      Javascripts
      \==================================================
    / Placed at the end of the document so the pages load faster
    = javascript_include_tag 'application'
    = yield(:script) if content_for?(:script)

1 个答案:

答案 0 :(得分:0)

删除它说丢失的文件后,我能够正确启动服务器。