1

Rails アプリを Production で起動しようとしていますが、動作せず、次のエラーで起動に失敗します (Development では問題なく動作します)。

ActionView::Template::Eror (no such file to load -- sass in (/.../app/assets/stylesheets/file.css.scss)):

13: ...
14: <%= stylesheet_link_tag "application", media => "all" %>
15: ...

app/views/layouts/application.html.erb: 14:in '_app_views_layouts_application_html_erb'

私はこの StackOverflow の投稿を見ました: Rails Error In Production, may due to link_tag and precompilation とgem 'therubyracer' をインストールしようとしましたが、一度それを実行してバンドル インストールを試みると、gem libv8 のインストール中に失敗します(An error occurred while installing libv8 (3.16.14.3), and bundler cannot continue)

それが役立つ場合、私のGemfileの関連部分:

gem 'rails', '3.2.12'
gem 'activerecord-jdbc-adapter', "1.2.2"
gem 'activerecord-jdbcpostgresql-adapter', '1.2.1'

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

gem 'therubyrhino'
gem 'jquery-rails', '2.2.1'
gem 'less-rails', '2.3.3'
gem 'rubyzip', '0.9.9'

config/database.yml ファイルの本番部分 (PostgreSQL を使用していますが、関連性があるかどうかはわかりません):

production:
  adapter: jdbc
  jndi: jdbc/appname
  database: appname
  user: appname
  password: appname
  host: <ip address>

どのように進めればよいか非常に混乱しており、助けていただければ幸いです。

注: warbler を使用して .war ファイルを作成し、GlassFish 経由で起動しようとしています

編集: 私の 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-datetimepicker
 *= require bootstrap-select.min
 */
4

0 に答える 0