I’m using breakpoint within a serve project. After adding require 'breakpoint' to my './config.ru' and #import 'breakpoint' to my stylesheets, breakpoint works well while running serve (which I actually run via Pow).
However, when using serve export to export the site to static HTML/CSS/JS files within a predetermined folder, I get the following error in my stylesheets:
/*
Syntax error: File to import not found or unreadable: breakpoint.
Load paths:
/Users/agarzola/git/devdev-splash/stylesheets
/Users/agarzola/.rvm/gems/ruby-1.9.2-p290/gems/compass-core-1.0.0.alpha.16/stylesheets
Compass::SpriteImporter
on line 5 of ./stylesheets/screen.sass
1: /Users/agarzola/git/devdev-splash/stylesheets/screen.sass
Backtrace:
./stylesheets/screen.sass:5
[…]
*/
I’ve been poking around the serve gem itself and found that export simply runs compass compile -c '#{#input}/compass.config' '#{#input}' to compile stylesheets before copying them to the destination folder. I had also learned some time ago that the export feature in serve does not yet use config.ru (as it should), and I haven’t been able to figure out where exactly I need to tell compass to use the installed breakpoint gem.
So I tried running compass compile -c ./compass.config and compass watch -c ./compass.config, both of which return a similar error:
error stylesheets/screen.sass (Line 5 of screen.sass: File to import not found or unreadable: breakpoint.
Load paths:
/Users/agarzola/git/devdev-splash/stylesheets
/Users/agarzola/.rvm/gems/ruby-1.9.2-p290/gems/compass-core-1.0.0.alpha.16/stylesheets
Compass::SpriteImporter)
I created an issue on the serve project, but I’m hoping someone here can share some much needed insight. Thanks!
I had a similar issue where I have to uninstall the theme and reinstall because for some reason the gems were not being seem. Post here
After I uninstalled the theme, I ran install bundle and then checked rvm requirements. Then I reinstalled the theme and subtheme. I do not use serve however this could be similar enough that it might work. I did not find anything that helped other then that.
Related
I am just trying to make a local development environment that isn't on my work computer, and I keep getting an error:
Warning: Errno::ENOENT on line 441 of /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb: No such file or directory - /Users/johnpett/Desktop/Node/app/bower_components
Run with --trace to see the full backtrace Use --force to continue.
I have installed all the Ruby parts and Yeoman to build the app scaffold, but I can't seem to run the 'grunt server' command without throwing up this error.
The error is quite clear, a grunt-plugin require that file...
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb
Anyway ruby components are needed usually if you plan to use compass, if not, you can comment the "compass" sub-task in the "server" task in Gruntfile.js
Your folder was surely not called bower_components at that time. I guess you used yeoman.
In your compass task config you should have modified bower_components.
I was working on this project yesterday using Sass and Breakpoint and everything was fine. This morning however when I went to compile using sass --watch .. I am getting this error:
error ../sass/screen.scss (Line 6: File to import not found or unreadable: breakpoint.
Load path: /Users/MOD3/Sites/GABE/stylesheets/stylesheets)
I am not sure why it is not finding breakpoint anymore but I am sure it is installed. I read something about it needing to be an absolute path, but where do I get that path from? Any idea how to fix this? It was working yesterday...
Breakpoint currently does not work with vanilla Sass as it requires a small bit of Ruby that is not available until Sass 3.3. My intuition is that you probably ran sass --compass --watch to allow Breakpoint to run through Compass. If not, I would highly encourage you to compile through Compass or Breakpoint will not work as expected.
UPDATE:
Issue was solved by running compass watch from same folder as config.rb.
I have a project using sass and i have a config.rb file setup to 'require' a gem (zen grids) which is then '#import'ed in my main .scss file but i'm getting errors File to import not found or unreadable: zen when I try to compile.
I'm running Mac OSX 10.8.3 and am using RVM and have 1.9.3-p362 as my default version.
Can anybody help? I would really appreciate any feedback on this.
I've resolved this. I think it was my structure. I let compass create a project for me and then I simply imported all the requires and #imports which I needed. No more errors and it all compiles fine.
I am building a new ruby script using GLI gem that uses Compass within. However, whenever I run the app using bundle exec SASS/Compass can never seem to find the mixins that I include in my .scss file. I get the following error...
error: File to import not found or unreadable: compass/css3.
I know the solution is to set an environment variable. However, I have no clue as to which variable needs to be set.
Update:
I should have added that this is a follow up to another post that I had - Using Compass from Ruby (not shell)
Here is the code that I am using to invoke compass from my app.
require 'compass'
require 'sass/plugin'
compiler = Compass::Compiler.new('.','.','.',{:style => :compact})
compiler.compile(sass_file,css_file)
Here is the error that is getting thrown
error: File to import not found or unreadable: compass/css3.
Load path: /Volumes/MacRAID/joeworkman/Desktop/stake-test/Badges/Badges.source/Contents
I originally thought that this only happened when I was running under bundle exec. However, its does happen every time even if I were to run in it normally.
Update #2:
I am pretty certain that this is a SASS :load_paths issue. If I set my SASS_PATH environment variable to the below value everything works. I don't want to depend on environment variables though.
~/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/frameworks/compass/stylesheets
Make sure that you check out the answers on the below post. Between my findings posted here and the suggestions made on the other post, the question is answered.
Using Compass from Ruby (not shell)
I am attempting to work locally on a PHP application which I cloned from the Git repository my partner and I use.
He uses a Mac, and until now I have been working on the app in a virtual Ubuntu Linux environment. Both environments have been able to use Compass polling with the same file structure and files.
On Windows 7, I run Compass commands from Cygwin, and this is the command I use to have Compass poll from the root directory of the app (C:/wamp/www/application):
compass watch --trace src/Application/ApplicationBundle/Resources/compass/
When I then make a change to a .scss file, I receive the following error:
ArgumentError on line 716 of /usr/lib/ruby/1.8/pathname.rb: different prefix: "/
/cygdrivecwampwwwlimelightsrclimelightlimelightbundleresourcescompasssrcpartials
_object.scss" and "/cygdrive/c/wamp/www/limelight/src/limelight/limelightbundle/
resources/compass/src"
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/path.rb:81:in 'split_path'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/path.rb:69:in 'run_callback'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/path.rb:55:in 'callback_action'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/path.rb:35:in 'update'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/state/directory.rb:39:in 'modified'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/state/directory.rb:37:in 'each'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/state/directory.rb:37:in 'modified'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/state/directory.rb:18:in 'refresh'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:17:in 'run'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:17:in 'each'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:17:in 'run'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:15:in 'loop'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/backends/polling.rb:15:in 'run'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm/monitor.rb:26:in 'run'
/usr/lib/ruby/gems/1.8/gems/fssm-0.2.7/lib/fssm.rb:20:in 'monitor'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/commands/watch_project.rb:86:in 'perform'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/commands/base.rb:18:in 'execute'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/commands/project_base.rb:19:in 'execute'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/exec/sub_command_ui.rb:43:in 'perform!'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/lib/compass/exec/sub_command_ui.rb:15:in 'run!'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/bin/compass:25
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/bin/compass:39:in 'call'
/usr/lib/ruby/gems/1.8/gems/compass-0.11.1/bin/compass:39
/usr/bin/compass:19:in 'load'
/usr/bin/compass:19
All I've been able to find through searching is that it may have something to do with the fact that Windows capitalizes its drive names, although the lack of slashes in the returned path makes me think the problem may be elsewhere.
Does anyone know why I might receive this error in Windows, but not other platforms?
NOTE: I have found a work-around involving installing ruby (and compass) through Windows' command prompt rather than Cygwin, and that should work fine for now. Still, if anyone has ideas, I'm still curious as to what the problem could be.
According to this commit, this is a problem caused by a compass dependency called FSSM. It is used to monitor file changes in compass. A workaround is described in this comment.
It seems that FSSM detects that ruby is running inside a Windows box, and treats paths in the Windows' way (C:\blabla). Commenting out the line 26 of the file <fssm_gem_path>/lib/fssm/pathname.rb makes compass watch work as expected. You can also add
unless path[0, 1] == File::SEPARATOR
to the end of line 26 to make it work.
I thought I'd just provide a little more info to help people find the pathname.rb file.
On the cygwin prompt type:
gem env
This (unsurprisingly) brings up a load of info about your Ruby Gems installtion. Look for the line which specifies the INSTALLATION DIRECTORY. Mine was:
/usr/lib/ruby/gems/1.8
Now in Windows Explorer navigate to this location but substitute "usr" for your cygwin installation directory. Therefore the above path becomes:
C:\cygwin\lib\ruby\gems\1.8
Once in this location drill down until you come across the fssm gem directory.
Within this [fssm] directory go into:
/lib/fssm/
...and there you should find the pathname.rb file.
Edit it as above and all is well. I hope this helps.
See here for a possible fix:
http://rails.webintellix.com/2010/05/27/error-in-ruby-relative_path_from-call-on-windows/
I was running into this same error with a slightly different setup. My project folder was on a network drive (ruby and sass/compass installed locally), and every time I made a change to a .scss file compass watch would crash with similar errors to the OP. I solved the issue by mapping my network drive instead of accessing it directly via the network (right clicked on My Computer and choose map network drive so I could access my remote drive at A:).
Now, instead of doing 'compass watch //SERVERNAME/My_Project' (I'm using Git Bash), I do 'compass watch a/My_Project' and compass stopped crashing.
Hope that helps someone else.
Using Cygwin, re install a compass dev release (such as 0.13+). Works for me with Compass 0.13.alpha.4 (Markab)
To do so:
gem uninstall compass
gem install compass --pre --no-rdoc --no-ri