twbs / bootstrap-sass

Official Sass port of Bootstrap 2 and 3.
http://getbootstrap.com/css/#sass
MIT License
12.58k stars 3.53k forks source link

Upgrading to bootstrap 3 #404

Closed sennor closed 11 years ago

sennor commented 11 years ago

I have tried to upgrade to Bootstrap 3.

In my gemfile I have:

gem 'bootstrap-sass', :git => 'git://github.com/thomas-mcdonald/bootstrap-sass.git', :branch => '3'

I have runned bundle install, but my boostrap version is still v2.3.1 when I check the generated application css..

Bundle list:

* bootstrap-sass (3.0.0.0 188f770)

davidcelis commented 11 years ago

Same thing's happening to me. I've bundled and restarted the server. Still using v2.3.1 for some reason.

EDIT: After completely wiping away the bundle and re-bundling from scratch, it's using v3.0.0. This doesn't seem to bode well for upgrading the gem in the future. What's the point if the assets don't end up correctly updating?

sennor commented 11 years ago

Update, after running bundle clean --force it's using v3.0.0

glebm commented 11 years ago

rm -rf tmp/cache is another solution (for Rails)

MrHubble commented 11 years ago

I have tried both rm -rf tmp/cache and bundle clean --force but Rails does not seem to include the bootstrap files anymore. In my gemfile I have gem 'bootstrap-sass', :git => 'git://github.com/thomas-mcdonald/bootstrap-sass.git', :branch => '3'.

When I try to run my app in development mode I get this error: Undefined mixin 'makeRow'.. When I search for _mixins.scssc it can not be found in tmp/cache (which is where it is located in my apps using version 2.x).

When I try to precompile my assets I get the message: couldn't find file 'bootstrap-collapse'

tobidelius commented 11 years ago

@MrHubble rake tmp:clear

MrHubble commented 11 years ago

thanks @sandelius , I just tried that but it didn't work. I don't think the problem is with clearing out the cache, it's with regenerating/including the files from the bootstrap-sass gem. It's like my rails app (or bundler?) won't pull in the relevant files from the gem.

Actually, I think I can see the issue I just don't know how to fix it (because I include v3 in my gemfile): gem list bootstrap-sass * LOCAL GEMS * bootstrap-sass (2.2.2.0)

glebm commented 11 years ago

@MrHubble Do you use any gems that depend on bootstrap-sass 2?

grep -n5 bootstrap-sass Gemfile.lock
MrHubble commented 11 years ago

@glebm hmm, good point. jquery-datatables-rails ??

https://gist.github.com/glebm/6338523

glebm commented 11 years ago

@MrHubble Nope, there aren't any. I can VNC / ssh into your machine and take a look if you want. Having my morning coffee right now (I am glex_at_skype on Skype).

But first:

gem update --system
gem uninstall bootstrap-sass
gem update bundler
rm Gemfile.lock
bundle
MrHubble commented 11 years ago

That would be great. I'm just heading on for a couple of hours so I will look for you after that.

On Mon, Aug 26, 2013 at 4:22 PM, Gleb Mazovetskiy notifications@github.comwrote:

@MrHubble https://github.com/MrHubble Nope, doesn't look like it. I can VNC into your machine and try to figure it out if you want. Having my morning coffee right now. Ping me on Skype glex_at_skype.

— Reply to this email directly or view it on GitHubhttps://github.com/thomas-mcdonald/bootstrap-sass/issues/404#issuecomment-23245447 .

tobidelius commented 11 years ago

@MrHubble Try bundle update then rake tmp:clear that worked for me.

MrHubble commented 11 years ago

It turns out I was doing a couple of things wrong:

  1. I was still using makeRow which I believe was a feature of bootstrap-sass 2.x but is no longer part of version 3 as it's a direct port of twitter bootstrap.
  2. I had the incorrect path for the bootstrap js files. Previously in bootstrap-sass 2.x I used //= require bootstrap-collapse, with version 3 we use //= require bootstrap/collapse

Thank you to everyone for helping me out and a massive thank you to @glebm for showing me what I was doing incorrectly and fixing it for me.