简体   繁体   中英

unexpected tLABEL (SyntaxError) - learn-rails

I have a SyntaxError error trying to work with localhost:3000. Thanks, I've spent a lot of time researching and can not find the correct answer.

/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’ } 
                                  ^

My code:

    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

You're using the wrong quotation marks.

’localhost:3000’

needs to be

'localhost:3000'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM