ruby1.9

How to write this MySql query using Rails3 syntax?

SELECT `subscriptions`.*, DATE_ADD(`subscriptions`.created_at, INTERVAL `packages`.validity DAY) as end_date FROM `subscriptions` INNER JOIN `packages` ON `packages`.`id` = `subscriptions`.`package_id` order by end_date; ...

Problem using Resque, Rails 3 and Active-Recored

I have this Class which response to perform to be run by "Resque", I have an error at this line recipient.response = response.body wich is undefined method response=' for #<Hash:0x00000003969da0> I think that because the worker and ActiveRecord can't work together. P.S I already loaded my environment and this class placed in lib directo...

Ruby 1.9 Array.to_s behaves differently?

i wrote a quick little application that takes a base file of code with some keywords, a file of replacements for the keywords, and outputs a new file with the keywords replaced. When i was using Ruby 1.8, my outputs would look fine. Now when using Ruby 1.9, my replaced code has the newline characters in it instead of line feeds. For e...

Regex "\w" doesn't process utf-8 characters in Ruby 1.9.2

Regex \w doesn't match utf-8 characters in Ruby 1.9.2. Anybody faced same problem? Example: /[\w\s]+/u In my rails application.rb I've added config.encoding = "utf-8" ...

Why are all strings ASCII-8BIT after I upgraded to Rails 3?

I upgraded to RoR 3.0.1 and Ruby to 1.9.2. Now all the strings in my views are ASCII-8BIT? I believe I have my app set up to use UTF 8 application.rb config.encoding = "utf-8" database.yml development: adapter: mysql encoding: utf8 I'm running OS X RVM rvm 1.0.16 Ruby ruby-1.9.2-p0 Rails 3.0.1 I'd expect that the enodin...

What does "Anonymous modules have no name to be referenced by" really mean?

I'm upgrading my Rails app to work with Ruby 1.9 and I keep encountering errors like this: Anonymous modules have no name to be referenced by /home/foo/.gem/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:585:in `to_constant_name' /home/foo/.gem/ruby/1.9.1/gems/activesupport-2.3.8/lib/active_support/dependencies.r...

Talking with a Ruby daemonized process

Hi, I use Ruby 1.9 and the following method inside my program: Process.daemon Then, when I open a new terminal, I would like to call my daemonized program (named my_program) and send to it a message. Such as this: $ my_program --are_you_still_alive Thank you for any idea. ...

Autotest not running in Ruby 1.9.2, only 1.8.7

UPDATE: It works now. I truly don't know what happened. I'll leave this Q up for some time, in case other experience the same. If not, I'll soon delete it. TLDR: autotest rspec works with ruby1.8.7 but not in ruby1.9.2. Using rails3, rspec2, autotest 4.4.1. In 1.9.2, it doesn't do anything after starting autotest. OK, now I'm real tire...