Update SASS in Netbeans JRuby? - ruby

I am using the SCSS-Editor for Netbeans on Windows so that I can edit and compile SCSS files in my projects. SCSS-Editor uses a bundled install of SASS/JRuby, although there is an option to use an external one (I'd prefer not to install the whole Ruby environment just for compiling SCSS files so the bundled one seemed ideal).
For the most part this works fine and I am enjoying using SCSS in my latest project. However, it seems some features of the language (i.e. the %class-name extends) may be unavailable to me due to the bundled SASS being an old version (3.1.20).
I've had a go in the command line (running as admin), but it isn't responding (cursor just there like it expects more). How can I go about updating the bundled SASS install that Netbean's JRuby is using?
Or is there an alternative solution (apart from installing Ruby or using ScoutApp)?
Many thanks

I've done this, but I should add as a disclaimer that I haven't conducted any thorough testing. That said, what I've done seems to work okay.
The "External Runtime" setting is just for the SASS runtime; the embedded JRuby version is still used so there's no messing around with Ruby installation. If you go to the SASS code archive on RubyForge and download and extract the latest tar version (stable is currently 3.2.9) to some appropriate folder, that folder is then suitable for the Sass plugin's "External Sass runtime" location.
The setting (I know you're aware of this, but just to make the answer complete) is in Tools->Options->Misc->Scss and put the folder you created into the SASS/HAML home box which appears when you select External Sass Runtime.
Obviously, there is potential for problems with new SASS on old JRuby and even new SASS on old SCSS-Editor, but my projects seem to compile okay.

Related

Upgrade ruby's OpenSSL version?

I am trying to build Ruby from source for Windows, and there doesn't seem to be very good documentation on how I can get a local build of OpenSSL to hook up to my ruby build. Is there some way I should be copying in DLLs/EXEs/whatever in order to build a version of Ruby with the latest OpenSSL version (like 1.0.1r or something)?
So yeah, this is both a simple and hard question.
First off, I'm assuming you're using the RubyInstaller project and not compiling with MSVC. If you are using MSVC then some of this may be useful, but overall not.
Just for reference this is the code that actually configures which version to use.
The next piece of valuable information, the environment RubyInstaller uses to build Ruby is based off of rubenvb's mingw64 builds(Version 4.7.2 in this case) and cherry picked MSYS tools. The compiler is important because issues have been known to happen using libraries that aren't built by the same compiler. I don't actually know much about that area.
RubyInstaller tries to avoid this problem by providing binaries built with the DevKit with the OpenKnapsack Project. The openssl libraries are downloaded from there for RubyInstaller builds. If there is a binary you want then you can upload a working recipe to the knapsack-recipes repo and it will be built in 32 and 64-bit flavors and uploaded. I do this manually. -sad face-
So, the simple part is you can take any of those binaries you want and just drop the DLL into the Ruby bin folder and it will link and use that DLL. But the version that Ruby is compiled with is a hard-coded constant and won't change even though you have a new version of the DLL.
The hard part is that if there isn't a recipe for the version you want in the knapsack-recipes repo you have to make one and submit a pull request or find/build the version yourself. And then if you really want to have the correct version hard coded in Ruby you have to change the config in the rubyinstaller project and then build Ruby yourself using a command like:
> rake ruby21 DKVER=mingw64-32-4.7.2 #32-bit
> rake ruby21 DKVER=mingw64-64-4.7.2 #64-bit

How to install Ruby Installer in Azure Websites

I'm using SASS in my application and i'm in the process of migrating to Azure.
I've got my project setup but it's not compiling the SASS. I'm trying to use the Ruby Installer from here http://rubyinstaller.org/downloads/ (Ruby 1.9.3-p551) and I've uploaded this via FTP to D:/home however when I try to install it simply using the command rubyinstaller-1.9.3-p551.exe it doesn't do anything. No error message or anything either.
Any suggestions?
Using the installer won't work because it probably requires an interactive session. What I did was get the Ruby binaries and FTP those to the website. You can find the binaries as as 7zip file on Ruby download page. I followed along this post: Installing Ruby 1.8.7 (and other stuff) manually. The part about zlib is probably outdated because there is a corresponding dll in the zipped archive already. I did download the other mentioned dll though (the iconv dll) and placed it in the Ruby bin folder.
Gem is already bundled in the package so no need to install that separately.
Unfortunately now I'm having difficulties in getting the gulp task to work because it is still saying "ruby and compass must be installed and in path". I set the path in the gulpfile.
You no longer need to depend on Ruby to compile your SASS.
LIBSASS has 100% parity with RUBY SASS, and doesn't come with the Ruby dependency.
If you're using grunt, you can switch over to LIBSASS by editing your gruntfile.js to use
grunt.loadNpmTasks('grunt-sass');
instead of
grunt.loadNpmTasks('grunt-contrib-sass');
You should also update your package.json file accordingly.
You can then get Azure to execute your grunt tasks as explained in this answer.

Trying to get SASS working with Netbeans 7.4

I am working on a project which has a number of sass files located in a sub directory called sass. I understand that in order for these files to be generated into css I am required to install ruby and compass.
I've done this. I am on a Windows 7 64bit OS. I downloaded the Ruby .exe from their site and ran it. I ran sass -v to check the version that was installed and it was Sass 3.4.1
Next I went into Netbeans and went tools->options->miscellaneous and went to the CSS Preprocessors tab. From here I entered the path to my sass.bat file which was was follows:
C:\Ruby193\bin\sass.bat
Following this I then restarted netbeans and opened a command line. I navigated to the sass folder of my project and ran the command compass watch however when I make a change to the sass file and save it is not being detected by compass which makes me think I've done something wrong.
I'd appreciate any help with this. I've not got a lot of experience with SASS.

Can't Find Compass Imports after Compass Install

I'm updating a PHP project using PHPStorm. I first started using SCSS by turning on the PHPStorm watch for the file type. It works fine. I then wanted to incorporate Compass. I successfully installed it and ran "Compass create --bare" in my project directory. Now when I include #import "compass/typography/vertical_rhythm", it can't find it. It's not surprising as there is no compass subdirectory. How do I install the required components? Didn't see any Compass option that seemed appropriate. I used the bare option because thats what's the Compass site gave me for an existing project.
Once I get it installed, do I need the Compass watch given I already have a file watcher running for SCSS files? The description of it indicates it does the same thing.
Running OS X 10.8.4
Answering my own question again. I should have plugged away a little longer. I'll leave this in case someone has the same problem.
The #import "compass/typography/vertical_rhythm is resolved by the the Compass compiler. Just running a vanilla SASS compiler isn't going to do it. At this point I make this happen by running compass compile on a bash command line. I haven't been been able to get the PHPStorm watcher to work correctly. A new version of PHPStorm was announced yesterday (5 Sep 2013) with additional support for Compass.
Update
There's another question here asking how to get compass compile to work with PHPStorm. It didn't work as written for me. I made a comment there on the changes I made to get it to do so.

Compile the most recent version of a package in an old system for local use

I need to know if it is possible to compile the best and newest package in an old, ancient system. Why? Well I'm limited at my company: I need to develop an application in an old Debian 3.0 server and I would prefer to use newer software to accomplish my task. Unfortunately, I'm not allowed to upgrade nor install any package.
Specifically, I want to parse XML files comfortably using xmlstarlet to do so. This server doesn't have it installed; if I download an older version of xmlstarlet supported by the system it's too old that I just lost the functionality I need. It just has three dependencies: libc6, libxml2 and libxslt1.1 (which are installed but are too ancient for a newer version of xmlstarlet)
So the question is: is there a way I can download this package and its dependencies (I think they are few and simple) and somehow compile them to work locally (not necessarily on the system's path, just in a working directory) without affecting in any way the legacy packages of the same name?
This system doesn't has PEAR either, nor PHP5, nor xmllint and I want to avoid coding in PHP4 to parse these XMLs. I really would like to work with xmlstarlet.
The answer to How to specify non-default shared-library path in GCC Linux? Getting "error while loading shared libraries" when running looks like it should work fine.
Or you could try static linking:
./configure --enable-static-libs

Resources