How to check if a given directory exists in Ruby?
I am trying to write a script which automatically checks out or updates a Subversion URL based on whether a specifie...
Error while installing json gem 'mkmf.rb can't find header files for ruby'?
For context, it on a remote server which has a firewall. I'm setting up my environment through a proxy. I have ruby ...
Error while installing json gem 'mkmf.rb can't find header files for ruby'?
For context, it on a remote server which has a firewall. I'm setting up my environment through a proxy. I have ruby ...
How to store the barcode only as a .png instead of on a A4 page using rghost??
I'm using rghost-barcode to generate an Aztec barcode. But every time I create a barcode it get's saved on a full A4...
How to generate a random string in Ruby?
I'm currently generating an 8-character pseudo-random uppercase string for "A" .. "Z": value = ""; 8.times{value &...
How to rename a file in Ruby??
Here's my .rb file: puts "Renaming files..." folder_path = "/home/papuccino1/Desktop/Test" Dir.glob(folder_path + ...
Ruby: How to convert a string to boolean?
I have a value that will be one of four things: boolean true, boolean false, the string "true", or the string "false...
RVM is not a function, selecting rubies with 'rvm use …' will not work?
List the ruby versions console:~$ rvm list rvm rubies ruby-2.0.0-p481 [ i686 ] # => - current # =* - current...
How to check for file existence [duplicate]?
This quest...
What does the % symbol mean in Ruby? [duplicate]?
This quest...
Effective way to memoize a combination of two numbers?
I'm working on an algorithm to count the number of ways to build 100 cents given an infinite amount of pennies, dime...
=0A in the subject of an email sent with Rails??
I have this in my user_mailer.rb class UserMailer < ActionMailer::Base default from: ["no-reply@#{CONFIG[:doma...
How to remove gem from Ruby on Rails application??
I have installed a gem on my Rails application (devise). After I installed the gem, I realized that I don't need it....
How to reverse a 'rails generate'?
I want to delete all the files it created and roll back any changes made, but not necessarily to the database, but m...
What is the “_path” method in ruby on rails??
I'm learning RoR, and I'm getting very confused by the "_path" method as it's used in Controllers and Routes. To be ...