设计在Rails 4.2网站上无法正常工作

时间:2015-10-21 13:25:49

标签: css ruby-on-rails twitter-bootstrap gem bundle

我遇到从Rails 3.2迁移到Rails 4.2的问题

我修复了问题但不是没有正确加载CSS。

以下是我的捆绑环境:

Environment

Bundler   1.10.6
Rubygems  2.0.14
Ruby      2.0.0p576 (2014-09-19 revision 47628) [x86_64-darwin15.0.0]
Git       2.3.8 (Apple Git-58)

的Gemfile

source 'https://rubygems.org'
gem 'rake'

gem 'capistrano'
gem 'capistrano-ext'
gem 'rails', '4.2.4'
gem 'mysql2', '~> 0.3.18'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'cancancan', '~> 1.10'
gem 'role_model'
gem 'authlogic'
gem 'aasm'
gem 'newrelic_rpm', :group => [:production]
gem 'by_star', :git => "git://github.com/radar/by_star"
gem 'paper_trail'
gem 'activerecord-session_store'

gem 'responders', '~> 2.0'

### Payment Processing ###

gem 'activemerchant'
gem 'stripe'
gem 'balanced'

### Accounting ###
gem 'acts_as_account'

# gem 'geokit'
# gem 'geokit-rails'
gem 'yajl-ruby'
gem "scoped_search"
gem 'will_paginate'
gem 'devise'
gem 'lob'

# Twilio (Do we need both of these? And what about twilio-ruby?)
gem 'twiliolib'
gem 'twilio-rb', {
  git: "git://github.com/stevegraham/twilio-rb.git",
  ref: "ac58b8674f064b31b4eb1ff39765e827aa92b99c"
} # https://github.com/stevegraham/twilio-rb/commit/ac58b8674f064b31b4eb1ff39765e827aa92b99c

gem 'xml-simple'
gem 'chronic'
gem 'georuby', require: 'geo_ruby'
gem 'paperclip'
gem "twitter-bootstrap-rails"
gem 'will_paginate-bootstrap'
gem 'simple_form'
gem 'prawn', '0.12.0'
gem 'pdfkit'
gem 'wkhtmltopdf-binary', :group => [:staging, :production, :development]
gem "net-ssh"
gem "highline"
gem "rmagick", "2.13.2"
gem "dbf"
gem 'aws-sdk', '< 2.0'
gem 'phaxio'
gem 'mail'
gem 'less-rails-fontawesome'
gem "rspec-rails", :group => [:test, :development]
gem 'debugger2', :group => [:test, :development]

gem 'less-rails', '~> 2.7.0' #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem 'nilify_blanks'

gem "auto_strip_attributes", "~> 2.0"

# For Interfax
gem 'typhoeus'

group :octodev, :staging, :production do
  gem 'ar-octopus'
end

group :development, :staging do
  gem 'rack-mini-profiler'
end

group :development, :test do
  gem 'simplecov', '~> 0.7.1', require: false
  gem 'timecop'
end

group :development do
  gem "parallel_tests"
  gem 'growl'
  gem 'web-console', '~> 2.0'
end

group :test do
  gem 'listen', '0.4.7'
  gem "factory_girl_rails"
  gem "capybara"
  gem 'rspec-steps'
  gem "guard-rspec"
  gem "rb-fsevent"
  gem 'terminal-notifier-guard'
  gem 'database_cleaner'
  gem 'vcr'
  gem 'fakeweb'
  gem 'capybara-mechanize'
  gem 'capybara-webkit'
  gem "selenium-webdriver", "~> 2.38.0"
  gem 'ruby_gntp'
end

gem 'sass-rails'
gem 'coffee-rails', '~> 4.0.0'
gem 'uglifier', '~> 1.3.0'
gem "therubyracer", '~> 0.12.0'


#for generating FAKE data
gem 'forgery', '0.5.0'
gem 'redis'
gem 'geocoder'
gem 'rb-readline', '~> 0.4.2'

# Email Stuff

gem 'premailer'

# add these gems to help with the transition:
gem 'protected_attributes'
gem 'rails-observers'
gem 'actionpack-page_caching'
gem 'actionpack-action_caching'
gem 'activerecord-deprecated_finders'

gem 'sprockets', '>= 3.0.0'
gem 'sprockets-es6'

Gemfile.lock的

GIT
  remote: git://github.com/radar/by_star
  revision: d2d997c98b43999283d6c443351dfae3815c02b4
  specs:
    by_star (2.2.1)
      activesupport

GIT
  remote: git://github.com/stevegraham/twilio-rb.git
  revision: ac58b8674f064b31b4eb1ff39765e827aa92b99c
  ref: ac58b8674f064b31b4eb1ff39765e827aa92b99c
  specs:
    twilio-rb (2.1.3)
      activesupport (>= 3.0.0)
      builder (>= 2.1.2)
      httparty (>= 0.6.1)
      i18n (~> 0.5)
      jwt (>= 0.1.3)

GEM
  remote: https://rubygems.org/
  specs:
    Ascii85 (1.0.2)
    aasm (4.3.0)
    actionmailer (4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 1.0, >= 1.0.5)
    actionpack (4.2.4)
      actionview (= 4.2.4)
      activesupport (= 4.2.4)
      rack (~> 1.6)
      rack-test (~> 0.6.2)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionpack-action_caching (1.1.1)
      actionpack (>= 4.0.0, < 5.0)
    actionpack-page_caching (1.0.2)
      actionpack (>= 4.0.0, < 5)
    actionview (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 1.0, >= 1.0.5)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    activejob (4.2.4)
      activesupport (= 4.2.4)
      globalid (>= 0.3.0)
    activemerchant (1.54.0)
      activesupport (>= 3.2.14, < 5.0.0)
      builder (>= 2.1.2, < 4.0.0)
      i18n (>= 0.6.9)
      nokogiri (~> 1.4)
    activemodel (4.2.4)
      activesupport (= 4.2.4)
      builder (~> 3.1)
    activerecord (4.2.4)
      activemodel (= 4.2.4)
      activesupport (= 4.2.4)
      arel (~> 6.0)
    activerecord-deprecated_finders (1.0.4)
    activerecord-session_store (0.1.1)
      actionpack (>= 4.0.0, < 5)
      activerecord (>= 4.0.0, < 5)
      railties (>= 4.0.0, < 5)
    activesupport (4.2.4)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    acts_as_account (3.1.2)
      actionpack (~> 4.1)
      activerecord (~> 4.1)
      database_cleaner (~> 1.3)
    addressable (2.3.8)
    afm (0.2.2)
    ar-octopus (0.8.5)
      activerecord (>= 3.2.0)
      activesupport (>= 3.2.0)
    arel (6.0.3)
    authlogic (3.4.6)
      activerecord (>= 3.2)
      activesupport (>= 3.2)
      request_store (~> 1.0)
      scrypt (>= 1.2, < 3.0)
    auto_strip_attributes (2.0.6)
      activerecord (>= 3.0)
    aws-sdk (1.66.0)
      aws-sdk-v1 (= 1.66.0)
    aws-sdk-v1 (1.66.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
    babel-source (5.8.26)
    babel-transpiler (0.7.0)
      babel-source (>= 4.0, < 6)
      execjs (~> 2.0)
    balanced (1.2.1)
      addressable (~> 2.3.5)
      faraday (>= 0.8.6, <= 0.9.0)
      faraday_middleware (~> 0.9.0)
    bcrypt (3.1.10)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    builder (3.2.2)
    cancancan (1.13.1)
    capistrano (3.4.0)
      i18n
      rake (>= 10.0.0)
      sshkit (~> 1.3)
    capistrano-ext (1.2.1)
      capistrano (>= 1.0.0)
    capybara (2.4.4)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    capybara-mechanize (1.4.0)
      capybara (~> 2.4.4)
      mechanize (~> 2.7.0)
    capybara-webkit (1.7.1)
      capybara (>= 2.3.0, < 2.6.0)
      json
    childprocess (0.5.6)
      ffi (~> 1.0, >= 1.0.11)
    chronic (0.10.2)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    cocaine (0.5.7)
      climate_control (>= 0.0.3, < 1.0)
    coderay (1.1.0)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.9.1.1)
    colorize (0.7.7)
    columnize (0.9.0)
    commonjs (0.2.7)
    css_parser (1.3.7)
      addressable
    database_cleaner (1.5.1)
    dbf (2.0.12)
      fastercsv (~> 1.5)
    debug_inspector (0.0.2)
    debugger-linecache (1.2.0)
    debugger2 (1.0.0.beta2)
      columnize (>= 0.3.1)
      debugger-linecache (~> 1.2.0)
    devise (3.5.2)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      responders
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    diff-lcs (1.2.5)
    domain_name (0.5.25)
      unf (>= 0.0.5, < 1.0.0)
    erubis (2.7.0)
    ethon (0.8.0)
      ffi (>= 1.3.0)
    execjs (2.6.0)
    factory_girl (4.5.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.5.0)
      factory_girl (~> 4.5.0)
      railties (>= 3.0.0)
    fakeweb (1.3.0)
    faraday (0.9.0)
      multipart-post (>= 1.2, < 3)
    faraday_middleware (0.9.2)
      faraday (>= 0.7.4, < 0.10)
    fastercsv (1.5.5)
    ffi (1.9.10)
    ffi-compiler (0.1.3)
      ffi (>= 1.0.0)
      rake
    forgery (0.5.0)
    geocoder (1.2.11)
    georuby (2.5.2)
    globalid (0.3.6)
      activesupport (>= 4.1.0)
    growl (1.0.3)
    guard (1.5.4)
      listen (>= 0.4.2)
      lumberjack (>= 1.0.2)
      pry (>= 0.9.10)
      thor (>= 0.14.6)
    guard-rspec (1.2.2)
      guard (>= 1.1)
    hashery (2.1.1)
    highline (1.7.8)
    htmlentities (4.3.4)
    httmultiparty (0.3.16)
      httparty (>= 0.7.3)
      mimemagic
      multipart-post
    http-cookie (1.0.2)
      domain_name (~> 0.5)
    httparty (0.13.7)
      json (~> 1.8)
      multi_xml (>= 0.5.2)
    i18n (0.7.0)
    jquery-rails (4.0.5)
      rails-dom-testing (~> 1.0)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (5.0.5)
      railties (>= 3.2.16)
    json (1.8.3)
    jwt (1.5.1)
    less (2.6.0)
      commonjs (~> 0.2.7)
    less-rails (2.7.0)
      actionpack (>= 4.0)
      less (~> 2.6.0)
      sprockets (> 2, < 4)
      tilt
    less-rails-fontawesome (0.5.1)
      less-rails (>= 2.1.7)
      railties (>= 3.1.1)
    libv8 (3.16.14.13)
    listen (0.4.7)
      rb-fchange (~> 0.0.5)
      rb-fsevent (~> 0.9.1)
      rb-inotify (~> 0.8.8)
    lob (2.1.2)
      rest-client (~> 1.8)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    lumberjack (1.0.9)
    mail (2.6.3)
      mime-types (>= 1.16, < 3)
    mechanize (2.7.3)
      domain_name (~> 0.5, >= 0.5.1)
      http-cookie (~> 1.0)
      mime-types (~> 2.0)
      net-http-digest_auth (~> 1.1, >= 1.1.1)
      net-http-persistent (~> 2.5, >= 2.5.2)
      nokogiri (~> 1.4)
      ntlm-http (~> 0.1, >= 0.1.1)
      webrobots (>= 0.0.9, < 0.2)
    method_source (0.8.2)
    mime-types (2.6.2)
    mimemagic (0.3.0)
    mini_portile (0.6.2)
    minitest (5.8.1)
    multi_json (1.11.2)
    multi_xml (0.5.5)
    multipart-post (2.0.0)
    mysql2 (0.3.20)
    net-http-digest_auth (1.4)
    net-http-persistent (2.9.4)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-ssh (3.0.1)
    netrc (0.10.3)
    newrelic_rpm (3.14.0.305)
    nilify_blanks (1.2.1)
      activerecord (>= 3.0.0)
      activesupport (>= 3.0.0)
    nokogiri (1.6.6.2)
      mini_portile (~> 0.6.0)
    ntlm-http (0.1.1)
    orm_adapter (0.5.0)
    paper_trail (4.0.0)
      activerecord (>= 3.0, < 6.0)
      activesupport (>= 3.0, < 6.0)
      request_store (~> 1.1)
    paperclip (4.3.1)
      activemodel (>= 3.2.0)
      activesupport (>= 3.2.0)
      cocaine (~> 0.5.5)
      mime-types
      mimemagic (= 0.3.0)
    parallel (1.6.1)
    parallel_tests (1.9.0)
      parallel
    pdf-reader (1.3.3)
      Ascii85 (~> 1.0.0)
      afm (~> 0.2.0)
      hashery (~> 2.0)
      ruby-rc4
      ttfunk
    pdfkit (0.8.2)
    phaxio (0.4.0)
      httmultiparty (~> 0.3.8)
    prawn (0.12.0)
      pdf-reader (>= 0.9.0)
      ttfunk (~> 1.0.2)
    premailer (1.8.6)
      css_parser (>= 1.3.6)
      htmlentities (>= 4.0.0)
    protected_attributes (1.1.3)
      activemodel (>= 4.0.1, < 5.0)
    pry (0.10.3)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    rack (1.6.4)
    rack-mini-profiler (0.9.7)
      rack (>= 1.1.3)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (4.2.4)
      actionmailer (= 4.2.4)
      actionpack (= 4.2.4)
      actionview (= 4.2.4)
      activejob (= 4.2.4)
      activemodel (= 4.2.4)
      activerecord (= 4.2.4)
      activesupport (= 4.2.4)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.2.4)
      sprockets-rails
    rails-deprecated_sanitizer (1.0.3)
      activesupport (>= 4.2.0.alpha)
    rails-dom-testing (1.0.7)
      activesupport (>= 4.2.0.beta, < 5.0)
      nokogiri (~> 1.6.0)
      rails-deprecated_sanitizer (>= 1.0.1)
    rails-html-sanitizer (1.0.2)
      loofah (~> 2.0)
    rails-observers (0.1.2)
      activemodel (~> 4.0)
    railties (4.2.4)
      actionpack (= 4.2.4)
      activesupport (= 4.2.4)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.4.2)
    rb-fchange (0.0.6)
      ffi
    rb-fsevent (0.9.6)
    rb-inotify (0.8.8)
      ffi (>= 0.5.0)
    rb-readline (0.4.2)
    redis (3.2.1)
    ref (2.0.0)
    request_store (1.2.0)
    responders (2.1.0)
      railties (>= 4.2.0, < 5)
    rest-client (1.8.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 3.0)
      netrc (~> 0.7)
    rmagick (2.13.2)
    role_model (0.8.2)
    rspec (3.3.0)
      rspec-core (~> 3.3.0)
      rspec-expectations (~> 3.3.0)
      rspec-mocks (~> 3.3.0)
    rspec-core (3.3.2)
      rspec-support (~> 3.3.0)
    rspec-expectations (3.3.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.3.0)
    rspec-mocks (3.3.2)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.3.0)
    rspec-rails (3.3.3)
      actionpack (>= 3.0, < 4.3)
      activesupport (>= 3.0, < 4.3)
      railties (>= 3.0, < 4.3)
      rspec-core (~> 3.3.0)
      rspec-expectations (~> 3.3.0)
      rspec-mocks (~> 3.3.0)
      rspec-support (~> 3.3.0)
    rspec-steps (2.0.1)
      rspec (>= 3.0, < 3.99)
    rspec-support (3.3.0)
    ruby-rc4 (0.1.5)
    ruby_gntp (0.3.4)
    rubyzip (1.1.7)
    sass (3.4.19)
    sass-rails (5.0.4)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    scoped_search (3.2.2)
      activerecord (>= 3.2.0)
    scrypt (2.0.2)
      ffi-compiler (>= 0.0.2)
      rake
    selenium-webdriver (2.38.0)
      childprocess (>= 0.2.5)
      multi_json (~> 1.0)
      rubyzip (~> 1.0)
      websocket (~> 1.0.4)
    simple_form (3.2.0)
      actionpack (~> 4.0)
      activemodel (~> 4.0)
    simplecov (0.7.1)
      multi_json (~> 1.0)
      simplecov-html (~> 0.7.1)
    simplecov-html (0.7.1)
    slop (3.6.0)
    sprockets (3.4.0)
      rack (> 1, < 3)
    sprockets-es6 (0.8.1)
      babel-source (>= 5.8.11)
      babel-transpiler
      sprockets (>= 3.0.0)
    sprockets-rails (2.3.3)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (>= 2.8, < 4.0)
    sshkit (1.7.1)
      colorize (>= 0.7.0)
      net-scp (>= 1.1.2)
      net-ssh (>= 2.8.0)
    stripe (1.30.2)
      json (~> 1.8.1)
      rest-client (~> 1.4)
    terminal-notifier-guard (1.6.4)
    therubyracer (0.12.2)
      libv8 (~> 3.16.14.0)
      ref
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (2.0.1)
    timecop (0.8.0)
    ttfunk (1.0.3)
    twiliolib (2.0.7)
      builder (>= 2.1.2)
    twitter-bootstrap-rails (3.2.0)
      actionpack (~> 4.1)
      execjs (~> 2.2)
      rails (~> 4.1)
      railties (~> 4.1)
    typhoeus (0.8.0)
      ethon (>= 0.8.0)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (1.3.0)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.7.1)
    vcr (2.9.3)
    warden (1.2.3)
      rack (>= 1.0)
    web-console (2.2.1)
      activemodel (>= 4.0)
      binding_of_caller (>= 0.7.2)
      railties (>= 4.0)
      sprockets-rails (>= 2.0, < 4.0)
    webrobots (0.1.1)
    websocket (1.0.7)
    will_paginate (3.0.7)
    will_paginate-bootstrap (1.0.1)
      will_paginate (>= 3.0.3)
    wkhtmltopdf-binary (0.9.9.3)
    xml-simple (1.1.5)
    xpath (2.0.0)
      nokogiri (~> 1.3)
    yajl-ruby (1.2.1)

PLATFORMS
  ruby

DEPENDENCIES
  aasm
  actionpack-action_caching
  actionpack-page_caching
  activemerchant
  activerecord-deprecated_finders
  activerecord-session_store
  acts_as_account
  ar-octopus
  authlogic
  auto_strip_attributes (~> 2.0)
  aws-sdk (< 2.0)
  balanced
  by_star!
  cancancan (~> 1.10)
  capistrano
  capistrano-ext
  capybara
  capybara-mechanize
  capybara-webkit
  chronic
  coffee-rails (~> 4.0.0)
  database_cleaner
  dbf
  debugger2
  devise
  factory_girl_rails
  fakeweb
  forgery (= 0.5.0)
  geocoder
  georuby
  growl
  guard-rspec
  highline
  jquery-rails
  jquery-ui-rails
  less-rails (~> 2.7.0)
  less-rails-fontawesome
  listen (= 0.4.7)
  lob
  mail
  mysql2 (~> 0.3.18)
  net-ssh
  newrelic_rpm
  nilify_blanks
  paper_trail
  paperclip
  parallel_tests
  pdfkit
  phaxio
  prawn (= 0.12.0)
  premailer
  protected_attributes
  rack-mini-profiler
  rails (= 4.2.4)
  rails-observers
  rake
  rb-fsevent
  rb-readline (~> 0.4.2)
  redis
  responders (~> 2.0)
  rmagick (= 2.13.2)
  role_model
  rspec-rails
  rspec-steps
  ruby_gntp
  sass-rails
  scoped_search
  selenium-webdriver (~> 2.38.0)
  simple_form
  simplecov (~> 0.7.1)
  sprockets (>= 3.0.0)
  sprockets-es6
  stripe
  terminal-notifier-guard
  therubyracer (~> 0.12.0)
  timecop
  twilio-rb!
  twiliolib
  twitter-bootstrap-rails
  typhoeus
  uglifier (~> 1.3.0)
  vcr
  web-console (~> 2.0)
  will_paginate
  will_paginate-bootstrap
  wkhtmltopdf-binary
  xml-simple
  yajl-ruby

BUNDLED WITH
   1.10.6

它没有显示任何错误,只是没有正常工作,我不知道它是Bootstrap,Less还是SASS?有什么建议吗?

谢谢

1 个答案:

答案 0 :(得分:0)

@max抱歉,我对前端和设计没有很多经验。

这是我的application.css

/* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * *= require_self *= require_tree . *= require bootstrap_and_overrides *= require jquery.tooltip *= require overcast/overcast *= require admin *= require_directory . *= require jquery-ui *= require jquery-ui/datepicker *= stub application-print *= stub application-email */