Ruby on rails 3.1 ArgumentError(2对1):Rails3.1.0<;%=样式表“U链接”标签;应用程序%&燃气轮机;

Ruby on rails 3.1 ArgumentError(2对1):Rails3.1.0<;%=样式表“U链接”标签;应用程序%&燃气轮机;,ruby-on-rails-3.1,Ruby On Rails 3.1,参数数量错误(2对1) 提取的源(第5行附近): 资产 我试过: <%= stylesheet_link_tag :all %> 但我得到了: <link href='assets/all.css' ...> 最让我困惑的是,我在MAC OS上运行一个应用程序,除了mysql和Gemfile之外,它的配置几乎相同,运行得很好,但当我转向centos5时,我发现了这些错误 <%= stylesheet_link_tag "application

参数数量错误(2对1) 提取的源(第5行附近):


资产
我试过:

<%= stylesheet_link_tag :all %> 

但我得到了:

<link href='assets/all.css' ...>

最让我困惑的是,我在MAC OS上运行一个应用程序,除了mysql和Gemfile之外,它的配置几乎相同,运行得很好,但当我转向centos5时,我发现了这些错误

<%= stylesheet_link_tag    "application" %>
另一个问题可能是
应用程序中的配置。css
您是否删除了注释或添加了一些内容

/*
 * This is a manifest file that'll automatically include all the stylesheets available in this directory
 * and any sub-directories. 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 .
*/
但这些只是猜测。。。但我希望这能引导你找到问题的解决办法

另一个问题可能是
应用程序中的配置。css
您是否删除了注释或添加了一些内容

/*
 * This is a manifest file that'll automatically include all the stylesheets available in this directory
 * and any sub-directories. 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 .
*/

但这些只是猜测。。。但我希望这能引导你找到问题的解决办法

我也遇到了这个问题,这是因为在新的资产管道工作之前,一些代码仍然针对旧的rails版本。具体来说,我有一个redmine插件,它使用带有两个参数的方法image_path:

图像路径('database\u refresh.png',:plugin=>redmine\u rate')

这已经不可能了,需要用显式计算插件特定路径的代码来替换。我使用的代码基于


请注意,这个解决方案是针对我在redmine上遇到的问题,而不是rails,但事实上可能是相关的。

我也遇到了这个问题,这是因为在新的资产管道工作之前,一些代码仍然针对旧的rails版本。具体来说,我有一个redmine插件,它使用带有两个参数的方法image_path:

图像路径('database\u refresh.png',:plugin=>redmine\u rate')

这已经不可能了,需要用显式计算插件特定路径的代码来替换。我使用的代码基于

请注意,这个解决方案是针对我在redmine上遇到的问题,而不是rails,但实际上可能是相关的

/*
 * This is a manifest file that'll automatically include all the stylesheets available in this directory
 * and any sub-directories. 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 .
*/