Rails アプリを本番環境にデプロイするときに遭遇したことのない奇妙な問題が発生しています。
走る:
bundle exec rake assets:precompile
これは出力です:
/home/ubuntu/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /home/ubuntu/.rvm/gems/ruby-2.0.0-p0/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
/home/ubuntu/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /home/ubuntu/.rvm/gems/ruby-2.0.0-p0/bin/rake assets:precompile:nondigest RAILS_ENV=production RAILS_GROUPS=assets
これは私の app/assets/javascripts/application.js です:
//= require jquery
//= require jquery_ujs
//= require jquery.ui.all
//= require twitter/bootstrap
//= require_tree .
そして、これは私の app/assets/stylesheets/application.css です:
/*
*= require_self
*= require jquery.ui.all
*= require_tree .
*/
プリコンパイル後、これは私の public/assets/application-946a5a61f067fe19fe65ffd12f8c4a20.js です。
//= require jquery
//= require jquery_ujs
//= require jquery.ui.all
//= require twitter/bootstrap
//= require_tree .
したがって、元のファイルとまったく同じです。
public/assets/application-df7525e917401704ef453cb56bf16697.css は空のファイルです。
これは私のGemfileです:
source 'http://rubygems.org'
gem 'rails', '3.1.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'settingslogic'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'json'
gem 'will_paginate', '~>3.0.pre2'
gem 'friendly_id', '~> 4.0.0.beta14'
gem 'rails3-jquery-autocomplete'
gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'paperclip', '~> 3.0'
gem 'public_activity'
gem 'rails-timeago'
gem 'therubyracer', :require => 'v8'
gem 'less-rails'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier', '>= 1.0.3'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
# Pretty printed test output
gem 'turn', :require => false
end
config/environments/production.rb:
Yupp::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
#config.assets.initialize_on_precompile = false
#...
end
どんな方向性でも大歓迎です。