I tried to setup my project as normal. In the config.rb file i require rgbapng and before of corse I installed it with sudo gem install compass-rgbapng.
Now when I now run compass compile . I get the following Errors.
compass compile .
error sass/styles.sass (Line 5: File to import not found or unreadable: rgbapng.
Load paths:
Compass::SpriteImporter
/home/my_user/public_html/spinnwerk/my_project/public/sass
/var/lib/gems/1.9.1/gems/compass-core-1.0.1/stylesheets)
The gem compass-rgbapng is located under /var/lib/gems/1.9.1/gems/compass-rgbapng-0.2.1. So How do I tell compass to watch in the right directory?
I fixe it for me by copying the file to te compass-core folder.
sudo cp /var/lib/gems/1.9.1/gems/compass-rgbapng-0.2.1/lib/stylesheets/_rgbapng.scss /var/lib/gems/1.9.1/gems/compass-core-1.0.1/stylesheets
This is a bad fix in my opinion, so I am still looking for a better way. If you can find one, pleas let me know.
Related
First off, I have little Linux experience and no Ruby experience, however, I have googled and could not find an area like what I'm getting. Any help is appreciated. I apologize if this is not a good place to post this. I have installed Jekyll with the following, and only the following, commands on Ubuntu 15.04 64 bit:
sudo apt-get install ruby-full
gem update --system
gem install jekyll
cd /home/william
mkdir CS
cd CS/
gem install execjs
sudo apt-get install nodejs
jekyll new kx8w
New jekyll site installed in /home/william/KX8W.
jekyll serve
The error returned by Jekyll is as follows:
Configuration file: none
Source: /home/william/CS
Destination: /home/william/CS/_site
Generating...
Build Warning: Layout 'post' requested in KX8W/_posts/2015-05-12-welcome-to-jekyll.markdown does not exist.
Build Warning: Layout 'page' requested in KX8W/about.md does not exist.
Build Warning: Layout 'default' requested in KX8W/index.html does not exist.
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'KX8W/css/main.scss':
File to import not found or unreadable: base. Load paths: on line 46
jekyll 2.5.3 | Error: File to import not found or unreadable: base.
Load paths:
on line 46
Welcome to Linux! You were close but need to make sure you're in the correct directory before running jekyll serve.
When you run:
jekyll new kx8w
It creates the new site in the directory you're currently in. The output line tells you where it put it (i.e. "/home/william/KX8W"). You need to be in that directory to start jekyll. So, do:
cd /home/william/KX8W
Once you do that jekyll serve will work as expected.
Note that for some reason jekyll built the site in the "/home/william/KX8W" directory instead of under the "/home/william/CS/KX8W" which is what I'd expect given your list of commands. That's probably related to the installs you did or maybe there was another change. Nothing to worry about, just something to watch out for. The biggest trick is just to make sure that after you run the jekyll new cool_new_site command you then change into that directory with cd cool_new_site before running jekyll serve.
I'm running the following command:
rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter --no-color --silent --rails --out checkstyle.xml
And get this error:
C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rubocop/formatter/checkstyle_formatter (LoadError)
Environment is Chef-DK 0.4.0 on Windows. I've installed the gem with:
gem install rubocop-checkstyle_formatter
RuboCop (0.28.0) is delivered within Chef-DK 0.4.0 and without Formater it is working.
Here is the page of the Formater: https://github.com/eitoball/rubocop-checkstyle_formatter
I didn't find any solution by searching with google or here in stackoverflow.
Any tipps how to fix or analyse the problem? I'm new to Ruby.
I solved this issue in a relatively hacky way but it works. So basically cd into your rubocop gem folder (like /home/ec2-user/.rvm/gems/ruby-2.1.2/gems/rubocop-0.34.2/lib/rubocop), then you'll see a dir named formatter, then cd into that formatter folder, you'll see a bunch of .rb files for different formatters.
Now here comes the solution.
touch checkstyle_formatter.rb
then copy https://github.com/eitoball/rubocop-checkstyle_formatter/blob/master/lib/rubocop/formatter/checkstyle_formatter.rb to the file you just created.
Then you should be good to go
I'm using Jekyll to create a static website and want to use the framework Bourbon to build my CSS from.
I've installed Jekyll and want to install Bourbon by adding it to my Gemfile using gem 'bourbon' and running bundle install.
Now when I add the rule #import 'bourbon'; to my SCSS file and start to run Jekyll by jekyll serve -w it starts, but when I modify my SCSS file the Jekyll watcher throws an error saying:
Regenerating: 1 files at 2014-07-03 10:00:11 `Conversion error: There was an error converting 'css/main.scss'.`
...error:
Error: File to import not found or unreadable: bourbon. Load path: /Users/mark/Code/markdejong.com/mistermark.github.com.jekyll/_sass
Error: Run jekyll build --trace for more information.
What can be the problem here? Shouldn't it be possible to import it like this or doesn't Jekyll support this?
Assuming you have a Gemfile:
source 'https://rubygems.org'
gem 'jekyll'
gem 'bourbon'
gem 'neat'
Add this line to _config.yml
gems: [bourbon, neat]
Jekyll will require these gems automatically.
Just do for import:
#import 'bourbon';
#import 'neat';
Check Jekyll docs for more information
http://jekyllrb.com/docs/plugins/
Did you do a
bourbon install
In order to create the bourbon folder ?
Bourbon's doc also says that for non rail app the import rule is :
#import 'bourbon/bourbon';
Did you import Bourbon at the Ruby level, with require 'bourbon?
Or in your Sass configuration?
With Sass, to use Bourbon installed with RubyGems, you have to tell the following command (note the argument -r bourbon):
sass -r bourbon -w css:sass
I do not know Jekyll, but it's perhaps a clue?
I'm trying to use the 960 grid system in my compass project.
So I installed the gem with:
gem install compass-960-plugin
Then in my compass project I add the folowing rule to my "config.rb" file:
# Require any additional compass plugins here.
require 'ninesixty'
But when I try to import in my screen.scss with:
#import 960/grid
It's not working. The error I get is as follows:
Compass was unable to compile one or more files in the project:
Compass was unable to compile one or more files in the project:
LoadError on line 161 of /Applications/CodeKit.app/Contents/Resources/engines/compass/bin/../lib/compass/configuration/data.rb:
no such file to load -- ninesixty Run with --trace to see the full
backtrace
It looks like the gem isn't in your LOAD_PATH. Did you require 'rubygems' before requiring the 960 gem? Are you using something like Bundler?
So I'm trying to install a package
$ sudo gem install compass
to be specific. It installs correctly and shows up when I do a list:
$ gem list
*** LOCAL GEMS ***
chunky_png (1.2.5)
compass (0.12.2)
fssm (0.2.9)
sass (3.1.20)
but for some reason when I try to run compass nothing happens. It says the command is not found. What am I doing wrong?
$ compass
bash: compass: command not found
I'm running Ubuntu if that helps.
Confirm that there is output for locate -r /compass.rb$, then echo $GEM_HOME. You should find that gem doesn't know about the directory that compass installed to. You can either move it from its previous location into the directory specified by GEM_HOME, or else append that directory to the variable in your ~/.bash_rc file. Much better, though, would be to use rvm for managing your gems (and Rubies), as it neatly avoids this sort of issue and also allows much finer control over the whole process.
This problem can be solved by follwing this:
http://markushedlund.com/dev-tech/ubuntu-compass-command-not-found
The problem is concerned about the global variable PATH that is not being updated correctly when installing gem compass
Run
echo "PATH=\$PATH:/var/lib/gems/1.8/bin:\$HOME/.gem/ruby/1.8/bin" >>
/etc/profile.d/rubygems1.8.sh
and re-login