Questions tagged [ruby-1.9]

Ruby 1.9 is a shortcut for ruby versions 1.9.1, 1.9.2 and 1.9.3. Ruby is a dynamic language that focuses on simplicity and expressiveness.

Ruby is a dynamic language that focuses on simplicity and expressiveness.

Ruby 1.9 is the successor of Ruby version 1.8, there are the subversions 1.9.1, 1.9.2 and 1.9.3. The successor Ruby 2.0 was published 2013-02-24.

Ruby 1.9 is incompatible with Ruby 1.8, the succcessor Ruby 2.0 is intended to be fully backward compatible with Ruby 1.9.3.

Ruby 1.9 introduced new features like:

  • Per-string character encodings are supported
  • Block local variables (variables that are local to the block in which they are declared)
  • An additional lambda syntax
  • New socket API (IPv6 support)
  • require_relative import security
429 questions
0
votes
1 answer

splats in array literals

according to the latest article by Dave Thomas in the pragpub magazine http://pragprog.com/magazines Ruby 1.9 should accept multiple splat arguments in array literals, eg: [ *'2'..'10', *%w{ J Q K A } ] But on my machine I am getting a parsing…
Jed Schneider
  • 14,085
  • 4
  • 35
  • 46
0
votes
3 answers

Mac snow leopard: ruby version kept coming back to 1.8.7

I installed ruby 1.9.2 and checked with ruby -v and it was fine (1.9.2) but after I restarted my computer after terminal somehow stopped responding, ruby switched back to 1.8.7. This has happened before and I ended up re-intalling. Do you know what…
0
votes
1 answer

Paperclip not working with ImageMagick on Windows

I just downloaded the RJCrop from github featuring use of Paperclip with JCrop. I tried running it on my Linux VPS, which worked just fine, however when I run the same project on my development Windows Vista x64 machine, I get this…
Jakub Arnold
  • 85,596
  • 89
  • 230
  • 327
0
votes
2 answers

Using ActiveSupport in Ruby 1.9.2 fails

I am requiring ActiveSupport in a Ruby script like so: require 'rubygems' require 'active_support/core_ext/hash' to use some_hash.with_indifferent_access. In Ruby 1.8 that worked fine but Ruby 1.9 throws the following…
Manuel Meurer
  • 3,238
  • 6
  • 35
  • 50
0
votes
2 answers

Talking with a Ruby daemonized process

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…
moshimoshi
  • 251
  • 1
  • 6
  • 15
0
votes
1 answer

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;
Amer
  • 1,968
  • 4
  • 21
  • 25
0
votes
5 answers

Geokit Gem 1.5 and Ruby 1.9.2 => "incompatible character encodings: UTF-8 and ASCII-8BIT"

I am currently writing a rails app using bleeding edge stuff. Rails3, rSpec2, Ruby 1.9.2 and Geokit 1.5.0. When i try to geocode addresses that have special characters that are not in ASCII-8Bit i get this error: incompatible character encodings: …
nocksock
  • 5,369
  • 6
  • 38
  • 63
0
votes
1 answer

Why do `p` and `puts` give the same output? Are both calling `to_s`?

In the following code, p and puts give the same output. class Book def initialize(title, price) @title = title @price = price end def to_s "book with title=#{@title} and price=#{@price}" end end book1 = Book.new("Book of…
Faruk Hossen
  • 185
  • 1
  • 8
0
votes
3 answers

Disabling Ruby 1.9.x's YARV compiler

There is a very noticeable difference in application initiation time between running my specs from the command line with ruby 1.9.x vs. 1.8.7. My application initiates much faster with ruby 1.8.7 than with ruby 1.9.1 or 1.9.2. The application…
Sean McCleary
  • 3,690
  • 4
  • 33
  • 43
0
votes
1 answer

sphinx, xmlpipe2, and cassandra

I start to using cassandra and I want to index my db with sphinx. I wrote ruby script which is used as xmlpipe, and I configure sphinx to use it. source xmlsrc { type = xmlpipe2 xmlpipe_command …
lisowski.r
  • 3,671
  • 1
  • 19
  • 16
0
votes
1 answer

Why does `[].to_s.empty?` behave differently between ruby 1.9 and 2.0?

This was the behaviour in 1.9 ruby: [].to_s.empty? #=> false {}.to_s.empty? #=> false [].to_s #=> "[]" {}.to_s #=> "{}" [43,43].to_s #=> "[43, 43]" {"fire"=>"water"}.to_s #=> "{\"fire\"=>\"water\"}" This is the behaviour in 2.0 ruby: [].to_s.empty?…
poliva83
  • 9
  • 2
0
votes
0 answers

How can I have Emacs ruby-mode highlight symbols in the Ruby 1.9 style?

Using Emacs 24.3.1, I would like to have symbols used in hashes with the trailing colon style introduced at Ruby 1.9.x highlighted as it highlights leading colon symbols. Is this possible? Screenshot:
tamouse
  • 2,169
  • 1
  • 19
  • 26
0
votes
1 answer

Problem with activesupport ruby 1.91 and rake

I have an installation of ruby 1.9.1 ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] when I try and run a rake task I am getting an error: rake aborted! no such file to load --…
Richard
  • 21,728
  • 13
  • 62
  • 101
0
votes
0 answers

Not able to install gem in 1.9 folder after upgrading from 1.8 to 1.9

i'm trying to upgrade my server from ruby 1.8 to 1.9 and i did that with following link. [http://kb.site5.com/ruby-on-rails/select-a-version-of-ruby-for-your-hosting-account/] i did all the things, Now ruby -v : ruby 1.9.3p484 (2013-11-22 revision…
Akki209
  • 123
  • 12
0
votes
1 answer

installing ruby/gnome2 on ruby1.9

My purpose is to install ruby/gnome2 and make it work with ruby1.9 on Ubuntu9.10. I already have ruby/gnome2 working with ruby1.8, but I need to make it work with ruby1.9. I also have ruby1.9 working. When I run within…
sawa
  • 165,429
  • 45
  • 277
  • 381