我尝试在生产环境中启动我的Rails应用程序,但它无法正常运行并且无法启动并出现以下错误(它在开发中运行正常):
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&#39; therubyracer&#39;但是一旦我这样做并尝试捆绑安装,它在尝试安装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
*/