P
P
pup_pupets2016-05-29 19:38:41
Ruby on Rails
pup_pupets, 2016-05-29 19:38:41

Where to look if assets does not compile and trace does not help?

[email protected]:/var/www/apps/testapp# rake assets:precompile RAILS_ENV=production --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile

And that's it, silence for about 10 minutes. The processor is loaded at 97%, nothing happens.
21d3dc96b4bf446695bfcf591331f523.png
Where else can I look if it's empty with trace ?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
pup_pupets, 2016-05-29
@pup_pupets

More recent versions of sprockets-rails, sass-rails, rails helped

A
Andrey Andreev, 2016-05-29
@b0nn1e

Perhaps you have a lot of things to compile, which is why it takes so long.

K
Kirill Turovnikov, 2015-09-01
Alexei Kozachuk

You need to specify the handler and data transfer method for the form, above in your code, the handler is the email.php file in the root directory of the site:
Send data using ajax, check if the fields are full, for this you need the jquery library and the script file itself, for example script.js located in the js folder in the root of the site.
Connect them to the head:

<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="/js/script.js"></script>

Below is the script.js script itself:
$(document).ready(function(){
    $('#contact-form').submit(function(){
            var subject = $(this).find("#subject :selected").text();
            var name = $(this).find("#name").val();
            var email = $(this).find("#email").val();
            var message = $(this).find("#message").val();

            if(!!name && !!email && !!message){
                $.ajax({
                    type: "POST",
                    url: "/email.php",
                    data: {"subject": subject, "name": name,"email": email, "message": message},
                    cache: false,
                    success: function(){
                        /* действия при успешной отправке */
                    }
                })
            }
        return false;
    });
});

And the last is the email.php handler itself, which sends letters, the last line indicates the recipient's address and the message header:
<? header("Content-type: text/html; charset=utf-8");

  $text = "<b>subject</b>: ".$_POST['subject']."<br>";
  $text .= "<b>name</b>: ".$_POST['name']."<br>" ;
  $text .= "<b>email</b>: ".$_POST['email']."<br>";
  $text .= "<b>message</b>: ".$_POST['message']."<br>";
  $headers .= "MIME-Version: 1.0\r\n";
  $headers .= "Content-Type: text/html; charset=UTF-8\r\n";
  mail('[email protected]', 'Заголовок письма', $text, $headers);

?>

P
PO6OT, 2015-09-01
@woonem

You must have been looking for an e-mail sending script, but found an e-mail sending form.
Search Google for "php email send script".
And make sure that php is executed in your file, that is, your file must be with the .php extension, php must be installed on the hosting (or on your server).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question