0

Rails 3.2 でアセット パイプラインをプリコンパイルする際にエラーが発生し続けます。rake assets:precompile で見られるのは次のとおりです。

2012-05-02T00:47:08+00:00 app[web.1]: => Rails 3.2.3 application starting in production on http://0.0.0.0:3847
2012-05-02T00:47:08+00:00 app[web.1]: => Call with -d to detach
c:/Ruby193/bin/rake:32:in `<main>'
c:/Ruby193/lib/ruby/1.9.1/rake/file_utils.rb:45:in `call'
c:/Ruby193/lib/ruby/1.9.1/rake/file_utils.rb:45:in `sh'
c:/Ruby193/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `sh'
c:/Ruby193/lib/ruby/1.9.1/rake/file_utils.rb:80:in `ruby'
c:/Ruby193/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `ruby'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:12:in `ruby_rake_task'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `call'
c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `each'
c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
c:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
c:/Ruby193/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `each'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
c:/Ruby193/lib/ruby/1.9.1/rake/application.rb:63:in `run'
c:/Ruby193/bin/rake:32:in `<main>'
Tasks: TOP => assets:precompile

私のapplication.cssと.jsにはそれぞれ次のものがあります。.css

>*= require overcast
>* =require jqgrid
>*= require_self
>*= require_tree .

.js

>//= require jquery
>//= require jquery_ujs
>//= require jquery-ui
>//= require jqgrid-ja
>//= require bootstrap
>//= require_directory .

私の宝石ファイル

source 'https://rubygems.org'

gem 'rails', '3.2.3'
gem 'bootstrap-sass', '2.0.2'
gem 'bcrypt-ruby', '3.0.1'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development, :test do
#  gem 'sqlite3', '1.3.5'
  gem 'pg', '0.12.2'
  gem 'rspec-rails', '2.9.0'
  gem 'guard-rspec', '0.5.5'
  gem 'annotate', '~> 2.4.1.beta'
end
group :test do
  gem 'rspec-rails', '2.9.0'
  gem 'capybara', '1.1.2'
  gem 'guard-spork', '0.3.2'
  gem 'spork', '0.9.0'
  gem 'factory_girl_rails', '1.4.0'
  gem 'cucumber-rails', '1.2.1', require: false
  gem 'database_cleaner', '0.7.0'
end
group :production do
  gem 'pg', '0.12.2'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.4'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
  gem "rails-asset-jqueryui"
  gem "rails-asset-jqgrid"
end

gem 'jquery-rails', '2.0.0'

プリコンパイルがうまくいかない理由を誰か知っていますか?

4

1 に答える 1

0

gemfile に rake を追加します。Ruby の stdlib には古いバージョンの rake が含まれています。

gem 'rake', '~> 0.9.2'

rake を呼び出しbundle execて、正しいバージョンが使用されていることを確認します。

bundle exec rake assets:precompile
于 2012-05-09T21:11:12.897 に答える