Active Admin 不起作用,SASS 错误无法将 Sass::Rails::Importer 转换为字符串

发布于 2024-12-12 07:10:33 字数 1633 浏览 2 评论 0原文

我在 Rails 应用程序中安装并配置“Active Admin”。它在我的两台计算机上运行良好,但在我的生产服务器上运行不正常。我在生产和开发(FreeBSD 服务器)中都遇到此错误:

Started GET "/admin/login" for 192.168.0.1 at Wed Oct 26 22:12:53 +0300 2011


Processing by ActiveAdmin::Devise::SessionsController#new as HTML
Rendered /usr/local/lib/ruby/gems/1.8/gems/devise-1.4.9/app/views/devise/shared/_links.erb (2.2ms)
Rendered /usr/local/lib/ruby/gems/1.8/gems/activeadmin-0.3.2/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (44.7ms)
Completed 500 Internal Server Error in 169ms

ActionView::Template::Error (can't convert Sass::Rails::Importer into String
  (in /usr/home/url.od.ua/app/assets/stylesheets/active_admin.css.scss)):
    6:   <title><%= [@page_title, active_admin_application.site_title].compact.join(" | ") %></title>
    7: 
    8:   <% ActiveAdmin.application.stylesheets.each do |path| %>
    9:     <%= stylesheet_link_tag path %>
    10:   <% end %>
    11:   <% ActiveAdmin.application.javascripts.each do |path| %>
    12:     <%= javascript_include_tag path %>
  app/assets/stylesheets/active_admin.css.scss:1

Rendered /usr/local/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.6ms)
Rendered /usr/local/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.7ms)
Rendered /usr/local/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (10.4ms)

所有宝石已安装!有什么想法吗?

I install and configure "Active Admin" to my rails app. It works fine on two of my computers, but not work at my production server. I have this error both in production and development (FreeBSD server):

Started GET "/admin/login" for 192.168.0.1 at Wed Oct 26 22:12:53 +0300 2011


Processing by ActiveAdmin::Devise::SessionsController#new as HTML
Rendered /usr/local/lib/ruby/gems/1.8/gems/devise-1.4.9/app/views/devise/shared/_links.erb (2.2ms)
Rendered /usr/local/lib/ruby/gems/1.8/gems/activeadmin-0.3.2/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (44.7ms)
Completed 500 Internal Server Error in 169ms

ActionView::Template::Error (can't convert Sass::Rails::Importer into String
  (in /usr/home/url.od.ua/app/assets/stylesheets/active_admin.css.scss)):
    6:   <title><%= [@page_title, active_admin_application.site_title].compact.join(" | ") %></title>
    7: 
    8:   <% ActiveAdmin.application.stylesheets.each do |path| %>
    9:     <%= stylesheet_link_tag path %>
    10:   <% end %>
    11:   <% ActiveAdmin.application.javascripts.each do |path| %>
    12:     <%= javascript_include_tag path %>
  app/assets/stylesheets/active_admin.css.scss:1

Rendered /usr/local/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.6ms)
Rendered /usr/local/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.7ms)
Rendered /usr/local/lib/ruby/gems/1.8/gems/actionpack-3.1.0/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (10.4ms)

All gems installed! Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖微凉心微凉 2024-12-19 07:10:33

我也有同样的问题。更新 haml gem 解决了这个问题:

gem 'haml', '~> 3.1.3'

I had the same problem. Updating haml gem solved it:

gem 'haml', '~> 3.1.3'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文