Don't work JavaScript pipeline. Need help. =(

Hello. I need some help with pipeline. I try build application with openlayer3. I compile ol.js. I put ol.js to /assets/javascripts/ . If I use

<%= javascript_include_tag “application”, “data-turbolinks-track” => true %>

``

in app\views\layouts\application.html.erb, I can see the map in my pages, but if i delete this line from file i can’t see map. Why this happend?

And another problem. I use bootstrap. I try create dropdown menu. I use:

  • Account
    • <%= link_to "Profile", current_user %>
    • <%= link_to "Settings", '#' %>
    • <%= link_to "Sign out", signout_path, method: "delete" %>
  • ``

    but menu don’t work. I start rails server, then press Account and do nothing. I think don’t work js path of bootstrap. But I add //= bootstrap in application.js . What I do wrong?

    Gemfile:

    source ‘https://rubygems.org

    Bundle edge Rails instead: gem ‘rails’, github: ‘rails/rails’

    gem ‘rails’, ‘4.0.2’

    gem ‘bootstrap-sass’, ‘2.3.2’

    gem ‘bcrypt-ruby’, ‘3.1.2’

    Use PostgresSQL for records

    gem ‘pg’, ‘0.15.1’

    group :development, :test do

    gem ‘rspec-rails’, ‘2.13.1’

    end

    group :test do

    gem ‘selenium-webdriver’, ‘2.35.1’

    gem ‘capybara’, ‘2.1.0’

    gem ‘factory_girl_rails’, ‘4.2.1’

    end

    Use SCSS for stylesheets

    gem ‘sass-rails’, ‘~> 4.0.0’

    Use Uglifier as compressor for JavaScript assets

    gem ‘uglifier’, ‘>= 1.3.0’

    Use CoffeeScript for .js.coffee assets and views

    gem ‘coffee-rails’, ‘~> 4.0.0’

    See https://github.com/sstephenson/execjs#readme for more supported runtimes

    gem ‘therubyracer’, platforms: :ruby

    Use jquery as the JavaScript library

    gem ‘jquery-rails’

    Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks

    gem ‘turbolinks’

    Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder

    gem ‘jbuilder’, ‘~> 1.2’

    group :doc do

    bundle exec rake doc:rails generates the API under doc/api.

    gem ‘sdoc’, require: false

    end

    group :production do

    gem ‘rails_12factor’, ‘0.0.2’

    end

    Use ActiveModel has_secure_password

    gem ‘bcrypt-ruby’, ‘~> 3.1.2’

    Use unicorn as the app server

    gem ‘unicorn’

    Use Capistrano for deployment

    gem ‘capistrano’, group: :development

    Use debugger

    gem ‘debugger’, group: [:development, :test]

    ``

    If you delete the javascript_include_tag “application” from your layout, it won’t load the pipelined javascripts.

    According to the bootstrap-sass README, you need to put the following:

    Require Bootstrap Javascripts in app/assets/javascripts/application.js:
    //= require jquery
    //= require bootstrap-sprockets

    Notice it says “bootstrap-sprockets”, not “bootstrap”.