加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 为什么Rails的语法“错误”带有勾号和引号?

发布时间:2020-12-17 02:38:00 所属栏目:百科 来源:网络整理
导读:采取以下错误: undefined method `id' for true:TrueClass/dev/MessageBooth/db/seeds.rb:17:in `top (required)'/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'/.rvm/gems/ruby-1.9.3-p362/bin/
采取以下错误:

undefined method `id' for true:TrueClass
/dev/MessageBooth/db/seeds.rb:17:in `<top (required)>'
/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `<main>'

错误被两个不同的{引号|包围蜱}.我开始寻找一个非常奇怪的错误,这个错误没有详细记录,并且可能与语法相关,所以这就是为什么我非常关注语法,并注意到这种趋势,但为什么要使用不同的封装引号呢?

解决方法

我已经在各种语言中看到过这种语法(我认为主要是在C语言中).我特别喜欢 this解释.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读