我的应用在我的电脑上看起来非常不错。我将其添加到仓库git add .
,git commit -m 'create app'
,并使用git push heroku master
将此仓库推送到heroku。它看起来与我的本地存储库完全相同,我期待的更少。
但是我再次推出了我的代码,现在有各种各样的怪异。原始bootstrap断点中不存在的蓝色字体无法正常工作。真是个噩梦。 Git向我保证一切都是最新的,然而本地回购是完美的,而且在heroku上运行的那个几乎没有功能(至少是html)。
这是什么原因?我的猜测是,我在本地删除的heroku遥控器中可能存在一些挥之不去的样式表。 如何确保我的heroku repo与我的本地仓库完全完全相同(包括已删除的文件)?
我的Gemfile:
source 'https://rubygems.org'
gem 'flexslider'
gem 'font-awesome-rails'
gem 'rails_12factor', group: :production
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
gem 'ruby'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
任何git技巧都欢迎!
答案 0 :(得分:3)
尝试预编译您的资产。
rake assets:预编译RAILS_ENV =生产