0

I download bootstrap and put bootstrap.css and bootstrap.js into my_app/vendor/assets/stylesheets and my_app/vendor/assets/javascripts respectively and also edit these files as follow:

app/assets/javascripts/application.js

//= require bootstrap

app/assets/stylesheets/application.css

 *= require bootstrap

bootstrap.css is loaded properly but having problem to load bootstrap.js.

2 Answers 2

1

And now you have a problem with loading the icons. I prefer to use the bootstrap-sass gem, where bootstrap is completely prepared for the asset pipeline, and sass, so I can even extend my own sass files with it. That way also the glyphs are loaded correctly. But I prefer font-awesome for my glyphs, instead.

So in my Gemfile I write:

group :assets do
  gem 'bootstrap-sass'
  gem 'font-awesome-rails'
end
Sign up to request clarification or add additional context in comments.

Comments

1

Try adding bootstrap.js to

app/assets/javascripts/bootstrap.js

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.