Ruby and compass path with yeoman project - ruby

I installed ruby, yeoman, and when I run my project, I have this error:
Warning: Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed
this task to work. More info: https://github.com/gru
Use --force to continue. Use --force to continue.
I have the path into the variable session target, but it doesn't work. Can anyone help me?

I had to run this:
gem install compass
Found here: Angular with Yeoman 1.0 and Grunt
(I thought I had Compass installed by following the instructions here but it wasn't sufficient.)

The problem comes from compass being called compass2.0
I solved the issue by symlinking compass to compass2.0
Here's the command: sudo ln -s /usr/bin/compass2.0 /usr/bin/compass
Hope this helps

I was getting the same error. Turns out it was masking the real error:
{ '0': [Error: Error: not found: bundle],
'1':
{ stdout: '',
stderr: 'Error: not found: bundle',
code: 127,
toString: [Function] },
'2': 127 }
Fixed with:
sudo gem install bundle --no-user-install

I had the same issue on Windows 7 too..
This is what I did.
Install Ruby with Ruby installer
Install the Compass with gem, (Installing the compass with npm didnt have any effect)
gem install compass

Related

Error installing SASS gem - don't have permissions

I'm not well versed in terminal, but I'll try my best to make this as clear and concise as I can.
I'm trying to install SASS and get the following errors:
When using gem install sass I get .
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
When using sudo gem install sass I get .
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
I have Xcode installed and I have agreed to the terms.
I even tried updating my Ruby, but terminal tells me I already have the most updated version.
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
The worst part of all of this is that when I navigate to my Ruby/Gems/2.3.0/gems directory, there is a sass-3.5.5 folder!!! (linked image to follow)
Ruby directory path to sass folder
I try running sass -v and get -bash: sass: command not found
I feel like I've tried everything that I can think of or find online. I'm at a loss and definitely need some help.
The issue can be fixed by installing RVM or Rbenv for managing ruby versions and gems.
Also, FilePermissionError can be fixed using the -n parameter
sudo gem install sass -n /usr/bin
I prefer not touching sudo command, so I managed to solve this issue by referring to SASS home page:
If you use Node.js, you can also install Sass using npm by running
npm install -g sass
If you find it helpful, kindly upvote or leave comment so that I know it can solve your issues too.
Or one could update the directory for where gems are installed.
Please see the origional answer here: https://stackoverflow.com/a/2619731/3302764
export GEM_HOME=~/.gem
export GEM_PATH=~/.gem

Warning: spawn ENOENT Use with Grunt sass task

I recently downloaded OSX Yosemite and now grunt-contrib-sass is not working and I am getting the error:
Running "sass:dist" (sass) task
Warning: spawn ENOENT Use --force to continue.
Aborted due to warnings.
I'm not a grunt expert, do I need to reinstall any plugins or something else? I'm happy to provide any other information if needed. Thanks.
Adding it as an answer here from comments above for posterity.
That error usually means Sass isn't installed. Run gem install sass to install it.
For me, it kept failing to install, so ran gem install sass --debug --backtrace --verbose and that fixed the no implicit conversion of nil into String (TypeError) install error.
I noticed that running compass directly threw an exception, so I uninstalled compass and reinstalled it (making sure to delete all compass binaries on PATH) and that fixed it.

why is this sass command giving me an error

I am trying to learn sass so I can develop my front end skills a little bit more because that is what I hope to be some day. The only thing is I can't get sass to work.
Whenever I run the sass --watch . command it returns this error.
>>> Sass is watching for changes. Press Ctrl-C to stop.
write ./test.css
LoadError: no such file to load -- rb-fsevent
Use --trace for backtrace.
I did a bit of research on this error and it was suggested on this site to just simply install the rb-fsevent file that is missing so I ran the gem install rb-fsevent command and then got this error.
Fetching: rb-fsevent-0.9.4.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
so I did a bit of research on THIS error and it was suggested agin on this site to just run the install with sudo. So i did just that I didn't get an error so i was quite excited because I have been fighting with this for a while so i want back to the start of this question and ran the --watch command and got the same exact error. Can anyone help me fix this?
Your first error is because Ruby can't load the rb-fsevent gem. This could be because the gem is not installed. Trying to install the gem was a good idea.
Your second error is because you are trying to install the gem to a directory that you do not have permissions for. Using sudo to do the install is an acceptable solution. You can also do gem install --user-install to install to your home directory.
You are still getting the first error because even though the gem is installed, Ruby cannot load it. This could be because sudo installed the gem with the wrong permissions, or installed it to the wrong location, or Ruby is looking for it in the wrong location.
Thus your solution would be to
Locate the gem files you installed
Check that their permissions allow you to read them
Check ruby -e 'p $LOAD_PATH' to see if Ruby is looking in the right place for the gem

Yeoman error: "Errno::EACCES on line ["897"] of C: Permission denied"

I upgraded my hardware yesterday and fresh installed Win 8.1. This error is killing me since then. I already lost full day of work trying to figure out what's going on. I never encountered this on my Mac or in my old Win 7 machine.
Setting up a new project with yo webapp using Bootstrap and Modernizr works great. Server would fire-up and I can see my updates livereload. But, setting up a new project with Compass and SASS included would prevent me from starting local server and throw this error:
D:\test>grunt serve
Running "serve" task
Running "clean:server" (clean) task
Running "concurrent:server" (concurrent) task
Running "copy:styles" (copy) task
Done, without errors.
Warning: Errno::EACCES on line ["897"] of C: Permission denied - (D:/test/.t
mp/styles/main.css20140323-6060-d9r9eo, D:/test/.tmp/styles/main.css)
Run with --trace to see the full backtrace Use --force to continue.
Aborted due to warnings.
Execution Time (2014-03-23 20:05:00 UTC)
concurrent:server 4.8s ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100%
Total 4.8s
D:\test>
I updated Compass and SASS to latest version, reinstalled Yeoman & Ruby, and tried bunch of other small tweaks. Nothing worked.
Any ideas what else I could try?
I have found solution for this issue. I guess this might help with other similar problems running grunt server. This is what did it for me:
Uninstall SASS
gem uninstall sass
Uninstall COMPASS
gem uninstall compass
Install --pre COMPASS version
gem install compass --pre
Install --pre SASS version
gem install sass --pre
For some reason only running task in this order worked for me. I hope this helps.
Issue is solved in SASS 3.2.19
Try gem update compass

Problems when creating Compass project (EACCES on line ["891"])

I am having problems when creating a new compass project (Windows 7). I get this:
C:\>compass create a
create config.rb
Errno::EACCES on line ["891"] of C: Permission denied - (C:/a/config.rb20140321-6828-1g0ytlc, C:/a/config.rb)
Run with --trace to see the full backtrace
I have tried to start cmd with "Run as administrator", I have tried to delete compass, sass and ruby, and reinstalled without any luck. Anyone else having problems or know a solution to this irritating problem?
I was using the latest version (21.03.2014) of compass v.0.12.4...
Downgraded to v.0.12.2 everything worked fine!
Looks like a bug?
To downgrade:
$ gem uninstall compass
$ gem uninstall sass
$ gem install compass -v 0.12.2
$ gem install sass -v <rev>
Please update to Sass 3.2.18 and let me know if that fixes it.
Is this linked to
Compass/Sass writing files with "No Access" permissions for Everyone group on OSX?
If so, updating to 3.2.18 hasn't made a difference.
This has been resolved in Compass version 0.12.5
https://github.com/chriseppstein/compass/issues/1618

Resources