Ruby 2.0.0p0 IRB warning: “DL is deprecated, please use Fiddle”

I just uninstalled my older versions of Ruby, removed all of my gems (including Rails), and installed Ruby 2.0. In other words, a totally clean re-install. Upon starting IRB, I received this message: DL is deprecated, please use Fiddle Note: I’m on a Windows machine. What does this message mean?

Using do block vs brackets {}

New to ruby, put on your newbie gloves. Is there any difference (obscure or practical) between the following two snippets? my_array = [:uno, :dos, :tres] my_array.each { |item| puts item } my_array = [:uno, :dos, :tres] my_array.each do |item| puts item end I realize the bracket syntax would allow you to place the block on […]

Uninitialized constant QuickbooksWebConnector

I want to use QBO in my Rails 3 app, so I have used a QuickbooksWebConnector gem and written: mount QuickbooksWebConnector::Engine => “/quickbooks_web_connector” in routes.rb. I ran bundle install and started the server, but this give me the following error: uninitialized constant QuickbooksWebConnector What can I do to fix this?

UML or class diagram for ruby fog gem interfacing with vsphere

I would like to have a UML diagram or a class diagram for the fog gem to better understand how it works. Any pointers would be helpful. Thanks!

Confusion with the assignment operation inside a falsy `if` block

This question already has an answer here: I don't understand ruby local scope 5 answers

undefined method `' for nil:NilClass when trying to access items in an array

I can’t access items from this array and I’m not sure why. I’m using a Gem called FastImage that takes image URLs and return its properties to crawl a webpage and return the width and height of all the images it finds. – url = open(“”).read – imgs = URI.extract(url).select{|img| img[/\.(?:png|jpe?g)\b/]}.each do |img| = FastImage.size(img) […]

ruby (extrat the ip address last login and sort them)

First I have a file derived from the last command in Linux. But I have hard time to figure out how to extract and sort every IP address and last command for each user. This actually how the file looks like: frank pts/5 Thu Dec 13 21:47 still logged in enha pts/3 Thu […]

my company name in the title of email for ruby on rails

I’m using a sendgrid gem to send emails with ruby on rails. I need to add the name of the company in the recipient’s name. I am using: mail( :from => “my company name <>”, :to => to, :subject => subject ) It does not work.

Ruby: require vs require_relative – best practice to workaround running in both Ruby <1.9.2 and >=1.9.2

What is the best practice if I want to require a relative file in Ruby and I want it to work in both 1.8.x and >=1.9.2? I see a few options: just do $LOAD_PATH << ‘.’ and forget everything do $LOAD_PATH << File.dirname(__FILE__) require ‘./path/to/file’ check if RUBY_VERSION < 1.9.2, then define require_relative as require, […]

Gitlab push – rubygems error

I am using gitlab as our local repository, but when i am pushing something into it, it tells me that i have something wrong with installed gems. I am not a Ruby programmer. Do you have some tips on how to fix it? Here is the problem: remote: /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.6.5/lib/bundler/dsl.rb:39:in `eval_gemfile’: Gemfile syntax error compile error […]

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