I'm using Compass.app GUI application on windows. By default I am having options to create new project with bootstrap-sass 3.2.0.1. How can i update this to bootstrap-sass 3.3.6?
You just need to put bootstrap-sass-3.3.6 folder in:
Windows:
compass.app/lib/ruby/compass_extensions
OSX:
compass.app/Contents/Resources/lib/ruby/compass_extensions
Compass will look automatically for the highest available version, you can leave previous version in compass folder.
Related
I have just started working on a ruby project and I notice that I have to specify the ruby version to use globally. For instance, I am using chruby to change the ruby version to use and I can set it directly at this file called .zshrc.
But if I have a multiple apps with different ruby version, then how do I handle it? It doesn't make sense if I keep changing the version to use at .zshrc file every time I want to run the other app.
Since it's a shared project so I cannot just change the version used in the app. Thank you.
In chruby, this feature is called "Auto-switching".
If you want chruby to auto-switch the current version of Ruby when you cd between your different projects, simply load auto.sh in ~/.bashrc or ~/.zshrc:
..
chruby will check the current and parent directories for a .ruby-version file.
https://github.com/postmodern/chruby#auto-switching
I have all the correct packages installed and have SASS running. Now I just need to figure out how to start a project with it. Are there any pre-built templates that show you the file structure, etc...Any help would be great!
An easy way would be to install Compass (http://compass-style.org/) and then it's a simple as running:
compass create project-name
Which would create the structure for you.
And then to compile
compass watch
More can be seen here http://thesassway.com/beginner/getting-started-with-sass-and-compass
Everytime I build a project I have to move the directories around. We also use Require.js, so I also have to copy and paste from a previous project the javascript initialization file that imports all of the foundation functionality.
I create these projects using either Webstorm 5's Foundation project template or via the command line using:
compass create my_project -r zurb-foundation --using foundation
Where would I go to modify these project templates? Is this down in some ruby path? Is there a project manifest file or something?
Thanks,
Scott
you can get the location of your gem installs from GEM_HOME
echo $GEM_HOME
in my case I get something like this:
/Users/myusername/.rvm/gems/ruby-1.9.3-p286
then in the gems directory you may see several instances of foundation. in my case an `ls' reveals the following directories:
zurb-foundation-3.2.1
zurb-foundation-3.2.2
zurb-foundation-3.2.5
zurb-foundation-4.0.2
zurb-foundation-4.0.3
if you are going to use compass create my_project -r zurb-foundation --using foundation it will pull from the latest version, in my case 4.0.3.
If you want to edit the compass blueprint directly, it is in:
zurb-foundation-4.0.3/templates/project
by modifying these files it will do as you intend, however, if you ever run gem update it is possible it will pull down a new version of foundation and start using that instead.
You might want to consider creating a fork of the foundation project, make the changes you need, and use bundle to create your compass projects. You could easily even create a script to do that.
Check it out on the Zurb Foundation 4 Documentation Page for Sass, under "Creating a project from Git"
I'd love to use Bourbon with LiveReload but I can't seem to get them to work together. Anybody successfully made these two play nice?
If you use the 'Run a custom command after processing changes' option rather than the standard compilation option, then you can use the commands as detailed on the readme.
# Example (project root directory)
sass --watch stylesheets/sass:stylesheets -r ./stylesheets/sass/bourbon/lib/bourbon.rb
I wrote a blog post covering this.
If you install the latest version (3.0.0) of Bourbon and install bourbon into your compass sass directory:
bourbon install --path ./sass
You can then use LiveReload with one small tweak. You will need to replace LiveReload's version of SASS with at least 3.2.3, since Bourbon requires this.
Instructions on how to replace LiveReload's default SASS version can be found here: http://carl-topham.com/theblog/post/changing-version-sass-livereload/
This seems to work for me.
I've been told you can get it to work by passing the lib/bourbon.rb file into the "Run a custom command" option in LiveReload. See attached image.
I wanted to use SASS on our company's web app but I can't install any programs on production machines. Everything I searched about SASS required you to run an installation program like gem and also required HAML.
I was hoping to find just a script that processes scss files without needing to install anything else.
Well... if you have Ruby available, you could checkout the Git repository of Sass (https://github.com/nex3/sass). Do so by either typing git clone https://github.com/nex3/sass.git or just downloading it.
Then you could use the interactive Ruby console by typing irb. Try to require 'sass/lib/sass' (this one here) and run Sass.compile_file 'my_styles.css'.
Otherwise... why are you trying to do that? You can also install sass locally, run sass --watch on your sass folder and it compiles your scss files automatically into css files - which you can deploy on your production environment.
If you can run java program in your build system, you could use JRuby for compiling sass. See this answer for more details
Here's a solution for using Sass without using the command line or installing dependencies. It works with Windows, OS X, and Linux. It has a graphical interface, and no installer, just unzip and double-click.
http://scout-app.io
You can also use the java library https://github.com/scireum/server-sass which can be embedded into any java based web-app. It will compile sass on the fly and return the resulting css. This is especially useful if the Sass sources change (i.e. for customizing reasons) and an ahead of time compilation is not possible. (Note: I'm the author of the project - and it is also not yet a complete implementation of the Sass standard).
Alternatively, what you could do is:
Install Ruby
Download the Sass Gem
Navigate to download location
Run: gem install sass-3.3.4.gem
Voila! Sass is installed.
Use the online Sass compiler SassMeister. You just have to paste your sass code on the left panel and get the css code on the right.