What is the easiest way to use HAML and SASS in no ruby project?

I need to use haml with sass in order to create templates. I don’t want to use rails. My main issue is haml partials including. Here is my current project structure: build source — scss — js — views — pages —- home.haml — index.haml I’ve tried to include home.haml as a partial in index.haml […]

Failed to build gem native extension ( em-irc )

Trying to install em-irc, got that: /usr/bin/ruby1.9.1 extconf.rb /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: cannot load such file — mkmf (LoadError) from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’ from extconf.rb:2:in `<main>’

Ruby On Rails : Difference between Gem & Plugin?

What is the difference between Gem & Plugin?

Why use Ruby's attr_accessor, attr_reader and attr_writer?

Ruby has this handy and convenient way to share instance variables by using keys like attr_accessor :var attr_reader :var attr_writer :var Why would I choose attr_reader or attr_writer if I could simply use attr_accessor? Is there something like performance (which I doubt)? I guess there is a reason, otherwise they wouldn’t have made such keys.

How do I refer a particular folder in Windows?

I download an old code(zip) files from git. Now I want to refer the folder location as load path so that I can use the code to split the zip, but I can see Split error is coming. The code I tried was $LOAD_PATH.unshift(‘c:/rubyzip/lib/zip’) require ‘zip/zip’ part_zip_count = Zip::ZipFile.split(“C:\junk\AWS Tools.zip”, 10240, false) puts “Zip file […]

How to set TLS context options in Ruby (like OpenSSL::SSL::SSL_OP_NO_SSLv2)

When using OpenSSL in C, we set options on the context to remove weak and wounded protocols like SSLv2 and SSLv3. From ssl.h, here is a bitmask of some of the options that are useful: #define SSL_OP_NO_SSLv2 0x01000000L #define SSL_OP_NO_SSLv3 0x02000000L #define SSL_OP_NO_TLSv1 0x04000000L #define SSL_OP_NO_TLSv1_2 0x08000000L #define SSL_OP_NO_TLSv1_1 0x10000000L However, I’m having trouble setting […]

Is it possible to have Methods inside Methods?

I have a method inside of a method. The interior method depends on a variable loop that is being run. Is that a bad idea?

Regex to match 1234, 1324, 2341 (all permutations of {1,2,3,4})

I am implementing the following problem in ruby. Here’s the pattern that I want : 1234, 1324, 1432, 1423, 2341 and so on i.e. the digits in the four digit number should be between [1-4] and should also be non-repetitive. to make you understand in a simple manner I take a two digit pattern and […]

How can I find which operating system my Ruby program is running on?

I want my Ruby program to do different things on a Mac than on Windows. How can I find out on which system my program is running?

Install *gem file with bundle

I try to develop a gem. I include it in my rails application through Gemfile with :path option for testing purpose, but there are some errors that appear when I build it and release to rubygems that does not appear when gem included from local path. How can I install gem from *gem file (made […]

Ruby is the best programming language in the world - Ruby on Rails.