Ruby on Rails
Monday, February 9, 2015
If you delete the javascript_include_tag "application" from your layout, it won't load the pipelined javascripts.
Require Bootstrap Javascripts inapp/assets/javascripts/application.js:
//= require jquery
//= require bootstrap-sprockets
Notice it says "bootstrap-sprockets", not "bootstrap".
On Mon, Feb 9, 2015 at 9:37 AM, Артем Попов <life@crabs.pro> wrote:
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:<li id="fat-menu" class="dropdown"><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 recordsgem 'pg', '0.15.1'group :development, :test dogem 'rspec-rails', '2.13.1'endgroup :test dogem 'selenium-webdriver', '2.35.1'gem 'capybara', '2.1.0'gem 'factory_girl_rails', '4.2.1'end# Use SCSS for stylesheetsgem 'sass-rails', '~> 4.0.0'# Use Uglifier as compressor for JavaScript assetsgem 'uglifier', '>= 1.3.0'# Use CoffeeScript for .js.coffee assets and viewsgem '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 librarygem 'jquery-rails'# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinksgem 'turbolinks'# Build JSON APIs with ease. Read more: https://github.com/rails/jbuildergem 'jbuilder', '~> 1.2'group :doc do# bundle exec rake doc:rails generates the API under doc/api.gem 'sdoc', require: falseendgroup :production dogem '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]
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0550d6e3-be63-43a0-abd6-8a0e4c49d0b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t_YmzORi20QgzOh0r4Huc0KPMGtSo9XnccS7CQ80ido0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment