0

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?

SirM
  • 487
  • 6
  • 22
  • 1
    Are you sure your team member is running `bundle install` ? Could you provide the output generated by the aforementioned command ? – lorefnon Apr 17 '14 at 14:16
  • So let me see if I understand the prerequisites properly. He would need to have ruby installed, have the bundler gem installed but would he also need to have the Ruby Dev Kit and do a "bundler install" on the project directory? I assumed the bundler install command was for setting up the project initially but is that the command that pulls down the require gems? – SirM Apr 17 '14 at 14:32
  • 1
    Yes, `bundle install` is required for fetching the requisite gems, their dependencies and installing them locally. More details are available here: http://bundler.io/v1.5/bundle_install.html – lorefnon Apr 17 '14 at 14:35
  • Ok we did all that and bundler install worked. But now getting error sass/main.scss (Line 2: File to import not found or unreadable: susy. Load paths: 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) – SirM Apr 17 '14 at 15:10
  • In addition, does compass create or init need to be run by the new developer if the original developer did this already and created the config.rb file? – SirM Apr 17 '14 at 16:16

1 Answers1

0

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.

SirM
  • 487
  • 6
  • 22