LESS CSS Programming - html

I am using an "OPEN SUSE-LINUX". There is no compiler available for less css in linux. For ex. "simple-less compiler" is not working in linux as it has .exe file.
So there is some difficulty which i came across.
So anyone can give me a basic info of how to use LESS CSS without using compiler. There is website for these kind of information but it have lots of ambiguity. Also need html file along with LESS CSS.
So clearly needed a html file which is linked with any less css minified version.

You can use Node module: https://npmjs.org/package/less
npm install -g less
lessc styles.less styles.css
If you use PHP as server-side language you can use the PHP compiler http://leafo.net/lessphp/

You'll have to compile the less code. I don't know if suse has package for gem/rubygems, but you can install gem and then use gem to install less.
How to install rubygems is more a OS question, programming. So StackOverflow may not be the right forum, but to point you in the right direction:
First hit on google for "less css suse" find an Ubundu solution. First line is dist-specific and the last line may require different paths on suse:
http://www.edmondscommerce.co.uk/less-css/less-css-installation-on-ubuntu-10-10/
sudo apt-get install rubygems1.8 ruby1.8-dev (ubuntu/debian)
sudo gem install rubygems-update
sudo gem update rubygems
sudo gem install less
sudo ln -s /var/lib/gems/1.8/bin/lessc /usr/bin/

Related

Uninstall Octave

I just compiled Octave source downloaded from the GNU site as explained here. That is
./configure
make
make install
Is it possible to remove it?
Thanks
In the same directory where you ran make install, run make uninstall.
Both install and uninstall targets are targets mandated by GNU standards and will work with any GNU project. In addition, many programs using GNU autotools (all the ones where you run ./configure && make && make install) will also have the uninstall target.

Gulp Compass broke down after Sass update 3.4.6

When my gulp runs compass over my sass file I run into the following error:
error src/scss/site/style.scss (/Library/Ruby/Gems/2.0.0/gems/sass-3.4.6/lib/sass/selector/abstract_sequence.rb:96:in `block in _specificity': undefined method `specificity' for [:not(.pointer)]:Array)
I don't know what this error means exactly, but the file it's pointed to has no special source, it's just a small legit scss file:
#import '../general';
.tld {
color: $color-primary;
}
I also keep getting these errors in my Gulp streams, it might be related:
[21:45:01] Ignoring psych-2.0.6 because its extensions are not built. Try: gem pristine psych-2.0.6
[21:45:01] Ignoring ffi-1.9.5 because its extensions are not built. Try: gem pristine ffi-1.9.5
Of course I tried the "gem pristine" but that doesn't do anything.
I don't know what happened all I know is that my gulpfile was the same last week and it worked flawlessly. I installed OSX Yosemite and didn't do anything special.
I know my description lacks stuff, but that's because I don't have a clue where to look for a solution, because I don't understand the error.
Ok, I was blaming my OSX Yosemite upgrade but this was not right. I also upgraded my gems and it appears my sass upgrade to 3.4.6 broke down sass. Downgrading to 3.4.5 does the job:
sudo gem uninstall sass
sudo gem install sass --version 3.4.5
This worked for me without downgrading anything:
gem pristine --all
Ref:
http://guides.rubygems.org/command-reference/#gem-pristine
SASS 3.4.5 will fix it:
sudo gem install sass --version 3.4.5
Also recommended is switching to using node-sass, as the libsass bindings are much cleaner to work with.

Is Installing Jruby on Nitrious.io possible?

Does Nitrous.io support JRuby?
Installing it with RVM seems to attempt to run a sudo apt-get update, which it won't allow...
Thanks.
First you will need to update RVM.
rvm get head
From there you can install jruby:
rvm install jruby
Next, set RVM to use jruby.
rvm use jruby
Next, add jruby to your PATH.
export PATH=$PATH:/opt/jruby/bin
From there you should be able to check that jruby is working with the following command:
jruby --version
So, installing a jruby binary seems to work fine, but still cant figure out how to get RVM to do the install...
So, I just manually moved jruby into the .rvm folder...I put a copy of the binary in the .rvm/rubies directory, made a symlink from the binaries' "jruby" executable to a "ruby" executable in the .rvm/rubies bin folder, made related empty folders for jruby in the .rvm/gems directory for the version of jruby, and did "rvm jruby-1.7.8 do rvm gemset create" and now I can do "rvm use jruby"...things seem to work fine.
I have a bad feeling about this tho. But I always do when using RVM...
I don't know if it will actually require any additional packages (so this might not work), but you could try running rvm with --autolibs=0 so it doesn't attempt to install any packages; see https://rvm.io/rvm/autolibs for details.

mysql-2.8.1 gem error

So when I tried to run bundle install I get an error for mysql-2.8.1.gem. I tried doing clean up command but still get the same error. This is the error message:
Fetching: mysql-2.8.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/lib/ruby/gems/1.8 directory.
As stated in the comments above, this is a permissions issue, and it would be correct to move it to Superuser since it's not a programming problem.
What is actually happening though, is that when you're running bundle install and not using rvm, bundle will try to save your freshly bundled gems to the default gem directory, which usually lives somewhere in /usr.
A normal user doesn't have write access to this directory. You could try to run the same command with sudo, i.e. sudo bundle install. That might work.
I'd really suggest that you use rvm for doing stuff like this, since it really helps keeping your gemsets clean and you won't run into these problems.
Rubygems tries to install gems for system-wide access (in a system-wide folder) by default, but it has a mode that lets you install them in a directory in your home directory.
One option is to install the gem sytemwide, you need root permission. On most modern linux distributions you can do this by using sudo gem install ....
If you really wanted this in your home directory, you should be aware that rubygems is not configured to automatically fall back to installing gems in your home directory when you try to install as a normal user. It prefers to give you an error message (the one you see here) unless you specifically indicate that you want to install the gem in your home directory. You can tell rubygems to install in your home directory by using gem install --user-install ...

Ruby mysql2 gem, cannot build on Windows 7

I come from OSX where Ruby runs super flawlessly 90% of the time. I haven't touched it in awhile though and happen to be working on a Windows 7 machine right now. I'm trying to run a simple Ruby on Rails project but I can't seem to get past any of my database setup.
I want to run on mysql but when I try to install the mysql2 gem (via bundle install or gem install mysql2) I get these errors:
Installing mysql2 (0.2.9) with native
extensions
C:/Ruby192/lib/ruby/site_ruby/1
.9.1/rubygems/installer.rb:533:in
`rescue in block in build_extensions':
ERROR: Failed to build gem native
extension.
(Gem::Installer::ExtensionBuildError)
C:/Ruby192/bin/ruby.exe extconf.rb checking for
rb_thread_blocking_region()... *
extconf.rb failed * Could not create
Makefile due to some reason, probably
lack of necessary libraries and/or
headers. Check the mkmf.log file for
more details. You may need
configuration options.
I'm pretty much a complete newb when it comes to this kind of thing so if anyone has any advice, please help!
To install and compile extensions sometimes you need libraries and headers of the dependencies. In this case, you need MySQL headers and libraries to properly compile.
Assuming you downloaded Ruby from RubyInstaller and also installed the Development Kit and followed it's installation instructions, to successfuly install mysql2 gem I recommend you read this answer in our Troubleshooting page:
Download MySQL Connector/C
Extract into a path without spaces
When installing mysql2 gem, provide the additional options (gem install mysql2 -v 0.2.10 -- --with-mysql-include=... --with-mysql-lib...)
Provide for --with-mysql-include option the path to the include directory of MySQL Connector/C. The same for --with-mysql-lib but this time point to lib directory.
Don't forget to copy libmysql.dll to your Ruby bin directory.
Hope this helps.
The problem with native extensions on Windows is that there are two different compiler infrastructures: one based on MS VC and its Visual Studio and one based on MinGW (Minimalist GCC for Windows).
There are Ruby native extensions that can be compiled with any of them and other, that only support one. And since most of them come from some kind of Unix, chances are that mingw works better that MSVC.
So you may try to install mingw and use it to compile mysql gem - there is a special package called devkit, which contains a minimal necessary mingw installation which you just put inside your ruby installation.
I had a success compiling several native extensions using devkit: eventmachine, linecache, bson-ext to name a few. And within devkit you will feel much more are home :-) (coming from OSX)
If you have the devkit setup correct as #Tomasz mentions, please make sure you check the compatibility of mysql2 gem version with windows, I have experienced in the past for it to cause issues and had to go and install a previous version to get it working. Last I remember v0.2.6 was the version that supported windows.