没有隐式转换nil成String [英] no implicit conversion of nil into String

查看:322
本文介绍了没有隐式转换nil成String的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我想在Ruby on Rails中设置一个简单的应用程序。我已迁移数据库,播种它,现在卡住了以下错误。

currently I'm trying to set up a simple app in Ruby on Rails. I've migrated the db, seeded it and am now stuck at the following error.

no implicit conversion of nil into String

Extracted source (around line #4):

1: <!--[if lt IE 9]>
2: <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
3: <![endif]-->
4: <%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
5: <%= stylesheet_link_tag 'blueprint/print',  :media => 'print' %>
6: <%= stylesheet_link_tag 'custom', :media => 'screen' %>

看起来资产标签助手不能正常工作或返回nil(如果可能的话)?

It seems like the asset tags helpers are not working properly or returning nil (if that's even possible)?

推荐答案

我通过将以下行添加到我的application.rb来修复此错误:

I hotfixed this error by adding the following line to my application.rb:

ActionController::Base.config.relative_url_root = ''


$ b b

错误很可能是由于我的rails版本是3.0.12的错误。

The error is most likely due to a bug in my rails version which is 3.0.12.

这篇关于没有隐式转换nil成String的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆