0

我正在尝试将 rails 应用程序部署到 jruby/tomcat。该应用程序已经在开发环境中使用 webrick 在 jruby 中运行。通过 warbler 部署到 tomcat 时出现错误

“没有要加载的文件——sass-rails”

我确实使用 rake assets:precompile 预编译了我的资产。生产中需要 sass-rails 是否正确?

编辑

这是宝石文件

source 'https://rubygems.org'
gem 'rails', '3.2.13'

group :assets do
  gem 'sass-rails',   '3.2.6'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'activerecord-jdbcsqlite3-adapter'
gem 'activerecord-jdbcmysql-adapter'
gem "bootstrap-sass", "~> 2.3.1.2"
gem "better_errors", ">= 0.7.2", :group => :development
gem "binding_of_caller", ">= 0.7.1", :group => :development, :platforms => [:mri_19, :rbx]
gem "cancan", ">= 1.6.9"
gem 'capistrano'
gem "capybara", ">= 2.0.3", :group => :test
gem "cucumber-rails", ">= 1.3.1", :group => :test, :require => false
gem "database_cleaner", ">= 1.0.0.RC1", :group => :test
gem "devise", ">= 2.2.3"
gem "email_spec", ">= 1.4.0", :group => :test
gem "factory_girl_rails", ">= 4.2.0", :group => [:development, :test]
gem "figaro", ">= 0.6.3"
gem "hub", ">= 1.10.2", :require => nil, :group => [:development]
gem 'jquery-rails'
gem 'jruby-openssl'
gem "launchy", ">= 2.2.0", :group => :test
gem "libv8", ">= 3.11.8"
gem "quiet_assets", ">= 1.0.2", :group => :development
gem "rolify", ">= 3.2.0"
gem "rspec-rails", ">= 2.12.2", :group => [:development, :test]
gem "simple_form", ">= 2.1.0"
gem "therubyracer", ">= 0.11.3", :group => :assets, :platform => :ruby, :require => "v8"
gem 'therubyrhino', '2.0.2', :platform => :jruby
gem 'will_paginate', '~> 3.0'
4

1 回答 1

0

不要写内部资产,用其他宝石写。

gem "sass-rails", "~> 4.0.1"

或者你也可以通过cmd安装。

gem install sass-rails
于 2013-10-20T09:17:51.033 回答