skip to Main Content

https://github.com/seyhunak/twitter-bootstrap-rails says:
Twitter Bootstrap for Rails 5 and Rails 4 Asset Pipeline

but after bundle install I see this:

Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:
    rails (= 4.1.7) was resolved to 4.1.7, which depends on
      actionpack (= 4.1.7)

    twitter-bootstrap-rails (~> 4.0.0) was resolved to 4.0.0, which depends on
      actionpack (>= 5.0.1, ~> 5.0)

Is it possible to make twitter-bootstrap-rails 4.0.0 worked with Rails 4.1.7?

3

Answers


  1. Chosen as BEST ANSWER
    • Cloned twitter-bootstrap-rails repo
    • Analyzed latest commits
    • Changed gemspecs
    • ????
    • PROFIT!!!

  2. Version you are using for twitter-bootstrap-rails is 4.0.0 having dependency on rails >= 5.0.1, ~> 5.0 you can check here.

    Use version 3.2.0 instead, it will work for you.

    gem "twitter-bootstrap-rails", '~> 3.2.0'
    
    Login or Signup to reply.
  3. I vote for using bootstrap 4 WITHOUT gem.

    In some cases and my experiences, this kind of implementation need less work when we integrate it to Rails manually :

    • download all the needed CSS, Java, creatives
    • put them all in the proper Rails assets folder
    • include them properly on the assets main file ( application.js, application.css, images )
    • use it by following the proper guide from the bootstrap website
    • have a desired looks as you wish

    This way, you won’t have to worries about gem dependencies or even ruby and rails versions.

    And totally welcoming any better ideas than mine.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search