Ruby is an open-source dynamic object-oriented interpreted language created by Yukihiro Matsumoto (Matz) in 1993.

learn more… | top users | synonyms | ruby jobs

0
votes
0answers
13 views

Threadsafety of Ruby variables?

This is a very basic concurrency question. In Ruby, is it safe to assume that any state stored in a local variable is threadsafe? Specifically, I'm thinking of a request in a Rails app. If I were to ...
-1
votes
0answers
11 views

How to add associations to module?

How to achive this sturcture in Rails? User has_one :health Health belongs_to :user has_many :weights has_many :diseases Health::Weight belongs_to :health Health::Diseases belongs_to :health ...
1
vote
0answers
27 views

LibUsb how to get avaible device commands?

How can I get the available device commands, with libusb? For example, an mouse has the commands right click, left click, scroll Thanks!
0
votes
1answer
22 views

convert “denormalised” hash

I am working with a file that has "denormalised" keys in it, and have read it into a hash. The hash looks like this in part: :primer_left_0_sequence=>"TCCTTCCTGCAGCCATGAAG", ...
1
vote
0answers
10 views

Skipping native extension recompilation on subsequent bundle install

My production deployments take a few extra minutes due to time it takes to install nokogiri gem (1.6.0). I understand this is because installing the gem triggers native extension compilation. Note ...
0
votes
1answer
29 views

rails regular expression validation string escape

I have a name attribute in my model which is validated by validates :name ,format:{with: /^[\p{L} \.'\-]+$/ , message: "invalid name" } The following syntax error was found while creating an ...
0
votes
1answer
21 views

Ruby on Rails accessing MySQL results error

In my view I send an ajax request to get the device_ports of a particular device. Previously I used def get_device_ports if params[:id] != '' @device_ports = ...
2
votes
4answers
44 views

Ruby: start_with? How to ignor uppercase?

Is there a better way to ignore uppercase than this? "Hello".start_with?("hell","Hell") #=> true I want to check if a string element in an array starts with another string ignoring uppercase, ...
0
votes
1answer
13 views

LibUsb undefined method all_input_usages

I wrote this little demo code with libUsb: require 'libusb' usb = LIBUSB::Context.new device = usb.devices(:idVendor => 2362).first puts device.all_input_usages But somehow i dont get the ...
0
votes
0answers
19 views

Using selenium-webdriver for parsing (Ruby)

Previously I used mechanize for parsing, but now I'm parsing website that uses javscript and mechanize doesn't support it, so I took selenium. I have to take information about companies from this ...
-2
votes
1answer
18 views

Backbone-Rails Tutorials [on hold]

Where is a good place to get started learning how to use Backbone in Rails? It seems to be all the rage nowadays. I know some basics of Rails and Backbone but I'm by no means an expert.
0
votes
0answers
4 views

chef mysql install specific version

I want to install mysql v5.5.27 and php v5.3.15 but opscode doesn't show how to do this. I've checked the recipes and saw the attributes and modified them but still no results. Is there a way to ...
0
votes
0answers
17 views

Use eventmachine with sinatra, why it will always quit?

why it always quit when i run this ruby program ? This is the ruby program: require 'rubygems' require 'eventmachine' require 'thread' require 'sinatra' Thread.new do EventMachine.run do ...
2
votes
0answers
22 views

activerecord & unicode characters

i'm trying to implement wysihml5 in a sinatra app using Activerecord. The rich text editor works great and when i submit the form i got right html post to controller: pry:> request.params => ...
0
votes
0answers
28 views

Why a upcase function made my rspec test to fail?

I'm developing a sign in/out function on a web app that i'm building for learning. During the week, i wasn't able to pass the following rspec test: describe "sucessfull log in" do let(:user) ...

1 2 3 4 5 5351
15 30 50 per page