json - 765: unexpected token at 'Mailgun Magnificent API' (Ruby on Rails, mailgun_rails) -


i've been trying set mailgun api rails app (in development) , i'm using mailgun_rails gem, when trying send message action controller gives me error:

json::parsererror in userscontroller#create

765: unexpected token @ 'mailgun magnificent api'

the extracted source follows:

@user = user.create(user_params) if @user.save   usermailer.account_activation(@user).deliver_now   flash[:info] = "please check email activate account."   redirect_to root_url 

my development.rb has following lines concerning action mailer:

config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :mailgun  config.action_mailer.default_url_options = { :host => 'localhost:3000' } config.action_mailer.perform_deliveries = true  config.action_mailer.mailgun_settings = {   api_key: env['mailgun_api_key'],   domain: env['mailgun_domain'] }  config.action_mailer.perform_caching = false 

the environments in .rbenv-vars file this:

mailgun_api_key=key-<<key>> mailgun_domain=mg.<<mydomain>>.nl 

all domain verifications & dns mailgun have been completed (and recognized mailgun itself).

could please me figure out what's going wrong?

edit

i forgot include terminal trace:

started post "/signup" 127.0.0.1 @ 2017-09-11 22:03:58 +0200    activerecord::schemamigration load (0.3ms)  select `schema_migrations`.* `schema_migrations`  processing userscontroller#create html    parameters: {"utf8"=>"✓", "authenticity_token"=>"<<token>>", "user"=>{"name"=>"mailtest", "email"=>"<<email>>", "password"=>"[filtered]", "password_confirmation"=>"[filtered]"}, "commit"=>"sign up"}     (0.2ms)  begin    user exists (0.3ms)  select  1 one `users` `users`.`email` = '<<email>>' limit 1    sql (0.3ms)  insert `users` (`email`, `name`, `created_at`, `updated_at`, `password_digest`, `activation_digest`) values ('<<email>>', 'mailtest', '2017-09-11 20:03:59', '2017-09-11 20:03:59', '<<token>>', '<<token>>')     (1.9ms)  commit     (0.2ms)  begin    user exists (0.3ms)  select  1 one `users` `users`.`email` = '<<email>>' , (`users`.`id` != 17) limit 1     (0.2ms)  commit    rendering user_mailer/account_activation.html.erb within layouts/mailer    rendered user_mailer/account_activation.html.erb within layouts/mailer (5.6ms)    rendering user_mailer/account_activation.text.erb within layouts/mailer    rendered user_mailer/account_activation.text.erb within layouts/mailer (0.6ms)  usermailer#account_activation: processed outbound mail in 222.3ms  sent mail <<email>> (1149.7ms)  date: mon, 11 sep 2017 22:03:59 +0200  from: noreply@<<domain>>.nl  to: <<email>>  message-id: <<id>>  subject: account activation  mime-version: 1.0  content-type: multipart/alternative;   boundary="--==_mimepart_59b6ec2f9d9da_4dd63ff8ffd4f034650e4";   charset=utf-8  content-transfer-encoding: 7bit      ----==_mimepart_59b6ec2f9d9da_4dd63ff8ffd4f034650e4  content-type: text/plain;   charset=utf-8  content-transfer-encoding: 7bit    hi mailtest,    welcome <<domain>>! click on link below activate account:    <<activation link>>      ----==_mimepart_59b6ec2f9d9da_4dd63ff8ffd4f034650e4  content-type: text/html;   charset=utf-8  content-transfer-encoding: 7bit    <!doctype html>  <html>    <head>      <meta http-equiv="content-type" content="text/html; charset=utf-8" />      <style>        /* email styles need inline */      </style>    </head>      <body>      <h1><<domain>></h1>    <p>hi mailtest,</p>    <p>  welcome <<domain>>! click on link below activate account:  </p>    <a href="<<activation link>>">activate</a>      </body>  </html>    ----==_mimepart_59b6ec2f9d9da_4dd63ff8ffd4f034650e4--    completed 500 internal server error in 1589ms (activerecord: 5.4ms)          json::parsererror (765: unexpected token @ 'mailgun magnificent api')


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -