Domanda

I created a project that is working and compiling sass as expected. My setup is just using sass, compass, & susy with Netbeans. I had another team member pull it from source control and he is unable to compile with the error:

Syntax error: File to import not found or unreadable: susy.
              Load paths:
                C:/wamp/www/77864nl2014/wp-content/themes/nl (DEPRECATED)
                C:/wamp/www/77864nl2014/wp-content/themes/nl/sass
                C:/Program Files (x86)/Prepros/gems/gems/bourbon-3.1.8/app/assets/stylesheets
                C:/Program Files (x86)/Prepros/gems/gems/neat-1.4.0/app/assets/stylesheets
                C:/wamp/www/77864nl2014/wp-content/themes/nl/sass
                C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-core-1.0.0.alpha.19/stylesheets
                Compass::SpriteImporter
        on line 2 of C:\wamp\www\77864nl2014\wp-content\themes\nl\sass\main.scss
  Use --trace for backtrace.

He is using prepros and has a watch setup on the projects sass directory. He says that prepros is setup with the compass option and configured to use ruby. He has also already installed bundler.

The project config.rb looks like this:

http_path = '/'
css_dir = '/wp-content/themes/nl/styles'
sass_dir = '/wp-content/themes/nl/sass'
images_dir = '/wp-content/themes/nl/images'
javascripts_dir = '/wp-content/themes/nl/scripts'

require 'bundler/setup'
require 'susy'

The Gemfile looks like:

source 'https://rubygems.org'
gem 'sass', '3.3.4'
gem 'compass','1.0.0.alpha.19'
gem 'susy','1.0.9'

I'm not sure what's going on exactly but have several things to try, but hope asking here could expedite the process. We have numerous developers in my office using PCs and Macs, with various IDEs and I was hoping bundler could help solve some issues we have been having. I want to be able to set the specific gems and versions used for a project and commit that with the rest of the project in source control. If another developer needs to work on that project I was hoping bundler would use or pull down the proper gems for the project and the developer would be off and running without having to update configs, gems, etc. Is this how bundler can work once we figure this out? If not is there another better solution for our situation and goals?

È stato utile?

Soluzione

The key was to prepend your "compass watch" with "bundle exec". So in command prompt, start your watch using "bundle exec compass watch" on the project directory.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top