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:
<a href="#" class="dropdown-toggle"
data-toggle=“dropdown”>
Account <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><%= link_to "Profile", current_user %></li>
<li><%= link_to "Settings", '#' %></li>
<li class="divider"></li>
<li>
<%= link_to "Sign out", signout_path, method:
“delete” %>
</li>
</ul>
</li>
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 GitHub - sstephenson/execjs: Run JavaScript code from Ruby 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: GitHub - turbolinks/turbolinks-classic: Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
gem ‘turbolinks’
Build JSON APIs with ease. Read more:
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