Checking if a variable is an integer?

Does Rails 3 or Ruby have a built-in way to check if a variable is an integer? For example, 1.is_an_int #=> tru...

How to click first link in list of items after upgrading to Capybara 2.0??

How to click first link in that case: <div class="item"> <a href="/agree/">Agree</a> </div&g...

How to do a newline in output?

How do I make \n actually work in my output? At the moment it just writes it all in 1 long block. Thanks for any hel...

TinyTDS: Server name not found in configuration files?

I keep seeing this error, and I am unable to connect to the database on the remote server. I am given a connection ...

Where does RACK log to??

I am running a sinatra app through RACK. To which file does the activity get logged ? Also how can I set the log fi...

Change rails version used by rvm?

Here are my local gems : $ gem list *** LOCAL GEMS *** actionmailer (4.0.0, 3.2.14) actionpack (4.0.0, 3.2.14) ac...

Rails 4: List of available datatypes?

Where can I find a list of data types that can be used in Ruby on Rails 4? Such as text string integer float ...

'sudo gem install' or 'gem install' and gem locations?

Running 'sudo gem list --local' and 'gem list --local' give me differing results. My gem path is set to my home fold...

How to click first link in list of items after upgrading to Capybara 2.0??

How to click first link in that case: <div class="item"> <a href="/agree/">Agree</a> </div&g...

What does the fail keyword do in Ruby??

I am learning Ruby and encountered the fail keyword. What does it mean? if password.length < 8 fail "Password...

Rails 3. How to get the difference between two arrays??

Let’s say I have this array with shipments ids. s = Shipment.find(:all, :select => "id") [#<Shipment id: 1...

Write to rails console?

When I want to try or debug smthing I run rails console and do some stuff there. I can print some text or variables ...

Rails model without database?

I want to create a Rails (2.1 and 2.2) model with ActiveRecord validations, but without a database table. What is t...