imathis / octopress

Octopress is an obsessively designed framework for Jekyll blogging. It’s easy to configure and easy to deploy. Sweet huh?
http://github.com/imathis/octopress
9.32k stars 2.62k forks source link

Using Octopress with Third Party Compass Plugins #1570

Closed jez closed 10 years ago

jez commented 10 years ago

I've been using Octopress and Compass for a little while and everything has been working fine. It's a slick blogging framework with a ton of great features :D

Recently though, I tried to get this third-party Compass plugin working for simplifying CSS3 animations. I followed the instructions listed to install it into my project directory, specifically:

gem install animation --pre

# in config.rb:
require 'animation'

// in screen.scss:
@import 'animation';

For whatever reason, using the commands bundle exec rake preview and bundle exec rake generate fail to start compass watching for changes (although it does launch the localhost webserver, and it still watches for other file changes). The only reason why I think it has something to do with Octopress is because running compass watch in another window compiles cleanly with no errors.

Has anyone else had an issue using third-party Compass plugins with Octopress? Any ideas on what might work to fix this? It's not exactly critical, but it certainly is annoying.

I'm running on:

Line 6 is the kicker:

$ bex rake preview
Starting to watch source with Jekyll and Compass. Starting Rack on port 4000
[2014-05-25 21:25:29] INFO  WEBrick 1.3.1
[2014-05-25 21:25:29] INFO  ruby 1.9.3 (2011-10-30) [x86_64-darwin13.1.0]
[2014-05-25 21:25:29] INFO  WEBrick::HTTPServer#start: pid=7709 port=4000
Configuration from /Users/Jake/Google Drive/Documents/Programming/web/io/zimmerman/blog-test/_config.yml
LoadError on line ["161"] of /Users/Jake/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/configuration/data.rb: cannot load such file -- animation
Run with --trace to see the full backtrace
Auto-regenerating enabled: source -> public
[2014-05-25 21:25:30] regeneration: 127 files changed

EDIT: Ignore that I accidentally closed it and then reopened it XD

codywilbourn commented 10 years ago

Was able to fix by adding gem 'animation', '~>0.1.alpha.3' to the Octopress Gemfile. After a bundle install, Octopress's compass install is able to identify the animation gem and successfully run everything on rake generate and rake preview. No extra compass compile needed.

parkr commented 10 years ago

Yep, that will do it. Glad you got it figured out!

jez commented 10 years ago

Also, for anyone else using this reading this thread and planning on using this plugin, it turns out that this project was actually integrated into Compass itself as "compass/css3/animation", so installing and configuring a pre-release gem isn't even required anymore.