首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >意外学习(SyntaxError) - tLABEL -rails

意外学习(SyntaxError) - tLABEL -rails
EN

Stack Overflow用户
提问于 2015-03-25 01:12:38
回答 1查看 473关注 0票数 1

我在尝试使用localhost:3000时出现SyntaxError错误。谢谢,我花了很多时间研究,但找不到正确的答案。

代码语言:javascript
复制
/Users/matt/.rvm/gems/ruby-2.2.1@learn-rails/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': /Users/matt/workspace/learn-rails/config/environments/development.rb:37: syntax error, unexpected tLABEL (SyntaxError)
...ions = { :host => ’localhost:3000’ } 
                                  ^

我的代码:

代码语言:javascript
复制
    Rails.application.configure do
    config.assets.debug = true
    config.action.mailer.smtp_settings = {
        address: “smtp.gmail.com”,
        port: 587,
        domain: Rails.application.secrets.domain_name,
        authentication: “plain”,
        user_name: Rails.application.secrets.email_provider_username,
        password: Rails.application.secrets.email_porvider_password
        }

  # ActionMailer Config
      config.action_mailer.default_url_options = { :host => ’localhost:3000’ } 
      config.action_mailer.delivery_method = :smtp
      config.action_mailer.raise_delivery_errors = true

  # Send email in development mode?
      config.action_mailer.perform_deliveries = true 
      config.action_mailer.default :charset => "utf-8"   
    end
EN

回答 1

Stack Overflow用户

发布于 2015-03-25 01:13:39

您使用了错误的引号。

代码语言:javascript
复制
’localhost:3000’

需要的是

代码语言:javascript
复制
'localhost:3000'
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29238880

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档