Подтвердить что ты не робот

Синтаксическая ошибка "синтаксическая ошибка, неожиданный конец ввода, ожидающий keyword_end (SyntaxError)"

Я не могу запустить свой тест Rspec user_spec.rb из-за синтаксической ошибки. Слишком много "концов", возможно, в двух разных файлах? Я добавил и удалил "конец" в определенных местах без успеха.

Синтаксическая ошибка "синтаксическая ошибка, неожиданный конец ввода, ожидающий keyword_end (SyntaxError)" require 'spec_helper'

user_spec.rb

describe User do

  before do
    @user = User.new(name: "Example User", email: "[email protected]",
                     password: "foobar", password_confirmation: "foobar")
  end

  subject { @user }

  it { should respond_to(:name) }
  it { should respond_to(:email) }
  it { should respond_to(:password_digest) }
  it { should respond_to(:password) }
  it { should respond_to(:password_confirmation) }

  it { should be_valid }

    before do
    @user = User.new(name: "Example User", email: "[email protected]")
  end

  subject { @user }

  it { should respond_to(:name) }
  it { should respond_to(:email) }
  it { should respond_to(:password_digest) }

  before do
    @user = User.new(name: "Example User", email: "[email protected]")
  end

  subject { @user }

  it { should respond_to(:name) }
  it { should respond_to(:email) }

  it { should be_valid }

  describe "when name is too long" do
    before { @user.name = "a" * 51 }
    it { should_not be_valid }
  end
end

describe "when email format is invalid" do
    it "should be invalid" do
      addresses = %w[[email protected],com user_at_foo.org [email protected]
                     [email protected]_baz.com [email protected]+baz.com]
      addresses.each do |invalid_address|
        @user.email = invalid_address
        expect(@user).not_to be_valid
      end
    end

  describe "when email format is valid" do
    it "should be valid" do
      addresses = %w[[email protected] [email protected] [email protected] [email protected]]
      addresses.each do |valid_address|
        @user.email = valid_address
        expect(@user).to be_valid
      end
    end


describe "when email address is already taken" do
    before do
      user_with_same_email = @user.dup
      user_with_same_email.save
    end
describe "when password is not present" do
    before do
      @user = User.new(name: "Example User", email: "[email protected]",
                       password: " ", password_confirmation: " ")
    end
    it { should_not be_valid }
  end

  describe "when password doesn't match confirmation" do
    before { @user.password_confirmation = "mismatch" }
    it { should_not be_valid }
  end

user_pages_spec.rb

   require 'spec_helper'

describe "User pages" do

  subject { page }

  describe "signup" do
    before { visit signup_path }


    it { should have_content('Sign up') }
    it { should have_title(full_title('Sign up')) }
  end
end

    let(:submit) { "Create my account" }

    describe "with invalid information" do
      it "should not create a user" do
        expect { click_button submit }.not_to change(User, :count)
      end
    end

    describe "with valid information" do
      before do
        fill_in "Name",         with: "Example User"
        fill_in "Email",        with: "[email protected]"
        fill_in "Password",     with: "foobar"
        fill_in "Confirmation", with: "foobar"
      end
    end

      it "should create a user" do
        expect { click_button submit }.to change(User, :count).by(1)
      end
    end

Выход терминала

/usr/local/rvm/gems/[email protected]_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load': /Users/Abraham/code/sample_app/spec/models/user_spec.rb:85: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)
    from /usr/local/rvm/gems/[email protected]_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
    from /usr/local/rvm/gems/[email protected]_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
    from /usr/local/rvm/gems/[email protected]_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
    from /usr/local/rvm/gems/[email protected]_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
    from /usr/local/rvm/gems/[email protected]_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
    from /usr/local/rvm/gems/[email protected]_rails_4_0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
4b9b3361

Ответ 1

Кажется, что у вас есть группа describe, у которой никогда нет ключевых слов end, начиная с describe "when email format is invalid" do до describe "when email address is already taken" do

Положите конец этим парням, и вы, вероятно, сделали =)

Ответ 2

Возможно, у вас здесь слишком много?

 describe "when name is too long" do
     before { @user.name = "a" * 51 }
     it { should_not be_valid }
 end
 end

Ответ 3

<!DOCTYPE html>
<html>
<head>
    <title>Home-Fotobook</title>
    <link rel="stylesheet" type="text/css" href="css/home.css">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
    integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
    crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
    integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
    crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
    integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
    crossorigin="anonymous"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
</head>
<body>
    <div><nav class="navbar navbar-dark fixed-top navbar-expand-md navbar-no-bg">
        <div class="container">
            <a class="navbar-brand" href="#">Fotobook</a>
            <form class="form-inline">
                <input class="form-control mr-sm-2" type="search" placeholder="Search Photo/Album" aria-label="Search">
            </form>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> 
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ml-auto" >
                    <li lass="nav-item "> <img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"></li>
                    <li class="nav-item active">
                        <a class="nav-link scroll-link" href="#@@">Tai-Anh</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link scroll-link text-light" href="#@@">Logout</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</div>
<div class="container-fluid text-center">    
    <div class="row content">
        <div class="col-sm-2 " >
            <p><a href="#">Feeds </a></p>
            <p><a href="#">Discover</a></p>
        </div>
        <div class="col-sm-8">
            <ul class="nav nav-tabs justify-content-center">
                <li class="nav-item ">
                    <a class="nav-link photo active " data-toggle="tab" href="#Photo">Photo</a>
                </li>
                <li class="nav-item" >
                    <a class="nav-link album"  data-toggle="tab" href="#Album">Album</a>
                </li>
            </ul>
            <div class="tab-content">
            <div id="Photo" class="container tab-pane active"><br>
        <ul class="cards">
          <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">    
            <div class="card">
              <div class="row">
                <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh ">

                  <img class="card_image openImageDialog thumbnail " src="img/img1.jpg" data-id="img/img1.jpg" data-toggle="modal" data-target="#flipFlop"   >

                </div>
                <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
                  <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>
                  </div>
                  <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

                  <h2 class="card_title">Class Information</h2>
                  <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
                  <div class="tim"><div class="HeartAnimation"></div>
                  <span class="text-tim" >63</span>
                  <span class="day-tim">4:56 pm 17/01/2019</span>
                </div>
              </div>

            </div>

          </div>
        </li>
        <!-- -------------------------------------------------------------------  -->
        <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
          <div class="card">
            <div class="row">
              <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh">

               <img class="card_image openImageDialog thumbnail" src="img/img2.jpg" data-id="img/img2.jpg" data-toggle="modal" data-target="#flipFlop"  >

             </div>
             <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
              <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>

              </div>
              <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

              <h2 class="card_title">Class Information</h2>
              <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
              <div class="tim"><div class="HeartAnimation"></div>
              <span class="text-tim" >63</span>
              <span class="day-tim">4:56 pm 17/01/2019</span>
            </div>
          </div>

        </div>

      </div>
    </li>
  </ul>
  <!--------------------------------------------------------------------------------------------------->
  <ul class="cards">
          <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
            <div class="card">
              <div class="row">
                <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh">

                  <img class="card_image openImageDialog thumbnail" src="img/img3.jpg" data-id="img/img3.jpg" data-toggle="modal" data-target="#flipFlop" >

                </div>
                <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
                  <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>
                  </div>
                  <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

                  <h2 class="card_title">Class Information</h2>
                  <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
                  <div class="tim"><div class="HeartAnimation"></div>
                  <span class="text-tim" >63</span>
                  <span class="day-tim">4:56 pm 17/01/2019</span>
                </div>
              </div>

            </div>

          </div>
        </li>
        <!-- -------------------------------------------------------------------  -->
        <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
          <div class="card">
            <div class="row">
              <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh">

               <img class="card_image openImageDialog thumbnail" src="img/img4.jpg" data-id="img/img4.jpg" data-toggle="modal" data-target="#flipFlop" >

             </div>
             <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
              <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>

              </div>
              <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

              <h2 class="card_title">Class Information</h2>
              <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
              <div class="tim"><div class="HeartAnimation"></div>
              <span class="text-tim" >63</span>
              <span class="day-tim">4:56 pm 17/01/2019</span>
            </div>
          </div>

        </div>

      </div>
    </li>
  </ul>
  <!------------------------------------------------------------------------------>
  <ul class="cards">
          <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
            <div class="card">
              <div class="row">
                <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh">

                  <img class="card_image openImageDialog thumbnail" src="img/img5.jpg" data-id="img/img5.jpg" data-toggle="modal" data-target="#flipFlop" >

                </div>
                <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
                  <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>
                  </div>
                  <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

                  <h2 class="card_title">Class Information</h2>
                  <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
                  <div class="tim"><div class="HeartAnimation"></div>
                  <span class="text-tim" >63</span>
                  <span class="day-tim">4:56 pm 17/01/2019</span>
                </div>
              </div>

            </div>

          </div>
        </li>
        <!-- -------------------------------------------------------------------  -->
        <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
          <div class="card">
            <div class="row">
              <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh">

               <img class="card_image openImageDialog thumbnail" src="img/img6.jpg" data-id="img/img6.jpg" data-toggle="modal" data-target="#flipFlop" >

             </div>
             <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
              <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>

              </div>
              <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

              <h2 class="card_title">Class Information</h2>
              <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
              <div class="tim"><div class="HeartAnimation"></div>
              <span class="text-tim" >63</span>
              <span class="day-tim">4:56 pm 17/01/2019</span>
            </div>
          </div>

        </div>

      </div>
    </li>
  </ul>                 
</div>
<div id="Album" class="container tab-pane fade "><br>
    <ul class="cards">
          <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
            <div class="card">
              <div class="row">
                <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh1">


                  <img class="card_image1 t" src="img/img1.jpg" data-id="img/img1.jpg" data-toggle="modal" href="#gardenImage" data-target="#basicExample" >
                  <img class="card_image1 t1" src="img/img2.jpg">
                  <img class="card_image1 t2" src="img/img3.jpg">

                </div>
                <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
                  <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>
                  </div>
                  <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

                  <h2 class="card_title">Class Information</h2>
                  <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
                  <div class="tim"><div class="HeartAnimation"></div>
                  <span class="text-tim" >63</span>
                  <span class="day-tim">4:56 pm 17/01/2019</span>
                </div>
              </div>

            </div>

          </div>
        </li>
        <!-- -------------------------------------------------------------------  --> 
        <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
          <div class="card">
            <div class="row">
              <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh1">

               <img class="card_image1 t" src="img/img2.jpg" data-id="img/img2.jpg" data-toggle="modal" href="#gardenImage" data-target="#basicExample">
                  <img class="card_image1 t1" src="img/img1.jpg">
                  <img class="card_image1 t2" src="img/img3.jpg">

             </div>
             <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
              <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>

              </div>
              <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

              <h2 class="card_title">Class Information</h2>
              <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
              <div class="tim"><div class="HeartAnimation"></div>
              <span class="text-tim" >63</span>
              <span class="day-tim">4:56 pm 17/01/2019</span>
            </div>
          </div>

        </div>

      </div>
    </li>
  </ul>
  <!--------------------------------------------------------------------------------------------------->
  <ul class="cards">
          <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
            <div class="card">
              <div class="row">
                <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh1">

                   <img class="card_image1 t" src="img/img3.jpg" data-id="img/img3.jpg" data-toggle="modal" href="#gardenImage" data-target="#basicExample" >
                  <img class="card_image1 t1" src="img/img4.jpg">
                  <img class="card_image1 t2" src="img/img5.jpg">

                </div>
                <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
                  <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>
                  </div>
                  <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

                  <h2 class="card_title">Class Information</h2>
                  <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
                  <div class="tim"><div class="HeartAnimation"></div>
                  <span class="text-tim" >63</span>
                  <span class="day-tim">4:56 pm 17/01/2019</span>
                </div>
              </div>

            </div>

          </div>
        </li>
        <!-- -------------------------------------------------------------------  -->
        <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
          <div class="card">
            <div class="row">
              <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh1">

               <img class="card_image1 t" src="img/img4.jpg" data-id="img/img4.jpg" data-toggle="modal" href="#gardenImage" data-target="#basicExample">
                  <img class="card_image1 t1" src="img/img3.jpg">
                  <img class="card_image1 t2" src="img/img6.jpg">

             </div>
             <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
              <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>

              </div>
              <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

              <h2 class="card_title">Class Information</h2>
              <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
              <div class="tim"><div class="HeartAnimation"></div>
              <span class="text-tim" >63</span>
              <span class="day-tim">4:56 pm 17/01/2019</span>
            </div>
          </div>

        </div>

      </div>
    </li>
  </ul>
  <!------------------------------------------------------------------------------>
  <ul class="cards">
          <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
            <div class="card">
              <div class="row">
                <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh1">

                  <img class="card_image1 t" src="img/img5.jpg" data-id="img/img5.jpg" data-toggle="modal" href="#gardenImage" data-target="#basicExample" >
                  <img class="card_image1 t1" src="img/img5.jpg">
                  <img class="card_image1 t2" src="img/img1.jpg">

                </div>
                <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
                  <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>
                  </div>
                  <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

                  <h2 class="card_title">Class Information</h2>
                  <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
                  <div class="tim"><div class="HeartAnimation"></div>
                  <span class="text-tim" >63</span>
                  <span class="day-tim">4:56 pm 17/01/2019</span>
                </div>
              </div>

            </div>

          </div>
        </li>
        <!-- -------------------------------------------------------------------  -->
        <li class="col-lg-6 col-12 col-sm-12 col-xl-6 cards_item">
          <div class="card">
            <div class="row">
              <div class="col-lg-6 col-6 col-sm-6 col-xl-6 anh1">

              <img class="card_image1 t" src="img/img6.jpg" data-id="img/img6.jpg" data-toggle="modal" href="#gardenImage" data-target="#basicExample" >
                  <img class="card_image1 t1" src="img/img3.jpg">
                  <img class="card_image1 t2" src="img/img4.jpg">

             </div>
             <div class=" col-lg-6 col-6 col-sm-6 col-xl-6  card_content">
              <div class="user1"><a href="#"><img src="img/img0.jpg" class="rounded-circle" alt="icon-acount"><span>Tai-Anh</span></a>

              </div>
              <button class="btn card_btn btn-sm bg-success"><small>follow</small></button>

              <h2 class="card_title">Class Information</h2>
              <p class="card_text">Thank you very much for your letter which arrived a few days ago. It was lovely to hear from you. I am sorry, I havent written for you such along time because I studied hard to pass the final exam. However, I had agreat weekend more than every when I went to live concerts last night with my friends. Now, I am writing to tell you how the wonderful concert is.</p>
              <div class="tim"><div class="HeartAnimation"></div>
              <span class="text-tim" >63</span>
              <span class="day-tim">4:56 pm 17/01/2019</span>
            </div>
          </div>

        </div>

      </div>
    </li>
  </ul>     
</div>
</div> 
<div class="col-sm-2" ></div>

<!-- The modal -->
      <div class="modal fade" id="flipFlop" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title" id="modalLabel">Flip-flop</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <img id="myImage" class="img-responsive" src="" alt="">
            </div>
            <div class="modal-footer tll">
              <button type="button" class="btn btn-primary d-flex"  data-dismiss="modal">Close</button>
            </div>
          </div>
        </div>  
</div>
<!-- Carousel -->
<!-- Modal -->
<!-- -silde -->
<div class="modal fade" id="basicExample" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
 <div class="modal-dialog" role="document">
  <div class="modal-content">
   <div id="carousel-example-1z" class="carousel slide carousel-fade" data-ride="carousel">
    <ol class="carousel-indicators">
     <li data-target="#carousel-example-1z" data-slide-to="0" class="active"></li>
     <li data-target="#carousel-example-1z" data-slide-to="1"></li>
     <li data-target="#carousel-example-1z" data-slide-to="2"></li>
     <li data-target="#carousel-example-1z" data-slide-to="3"></li>
     <li data-target="#carousel-example-1z" data-slide-to="4"></li>
     <li data-target="#carousel-example-1z" data-slide-to="5"></li>
   </ol>
   <div class="carousel-inner" role="listbox">
     <div class="carousel-item active">
      <img class="d-block w-100 height-100" src="img/img1.jpg" alt="First slide">
    </div>
    <div class="carousel-item ">
      <img class="d-block w-100 height-100" src="img/img2.jpg" alt="Second slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100 height-100" src="img/img3.jpg" alt="Third slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100 height-100" src="img/img4.jpg" alt="Four slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100 height-100" src="img/img5.jpg" alt="Five slide">
    </div>
    <div class="carousel-item">
      <img class="d-block w-100 height-100" src="img/img6.jpg" alt="Six slide">
    </div>
  </div>
  <a class="carousel-control-prev" href="#carousel-example-1z" role="button" data-slide="prev">
   <span class="carousel-control-prev-icon" aria-hidden="true"></span>
   <span class="sr-only">Previous</span>
 </a>
 <a class="carousel-control-next" href="#carousel-example-1z" role="button" data-slide="next">
   <span class="carousel-control-next-icon" aria-hidden="true"></span>
   <span class="sr-only">Next</span>
 </a>
</div>
</div>
</div>
</div>

<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/script1.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>

Ответ 4

$rails server -b $IP -p $PORT - для меня эта проблема решена