Ruby 1.9.1 RC1 was released today so I quickly moved to install it (a test version of course using a suffix of 19). I install Rails and Rack for the 1.9 RubyGems and then create a new Rails site using edge... when I execute:
ruby19 ./script/server
I watch as the processor usage goes up to 99.8 and the terminal just sits there. Trying ...
According to this post, RDoc::usage is not currently available in ruby 1.9. Are there any good replacements available?
I'd be interested to hear what's available from the standard install as well as what's available from gems.
...
I initiated myself into rails development yesterday.
I installed ruby 1.9.1, rubygems and rails.
Running gem install mongrel worked fine and ostensibly installed mongrel too. I am slightly puzzled because:
script/server starts webrick by default
which mongrel returns nothing
locate mongrel returns lots of entries like
/Developer/SDK...
I guess the default encodings have changed with 1.9, but I thought Ramaze was supposed to be fully 1.9 compatible? I'm really not sure what going on here. Thanks for any help!
...
Hi,
I've installed Ruby 1.9.1 alongside Ruby 1.8.6 on my Mac OS X Leopard using the prefix and program-suffix options so that I can run Ruby 1.9 stuff by issuing ruby19, irb19, gem19, etc. commands.
I've installed the corresponding gems and can run rake19 spec to execute my rspec tests but when I run autospec I get:
loading autotes...
I have a Sinatra application (http://analyzethis.espace-technologies.com) that does the following
Retrieve an HTML page (via net/http)
Create a Nokogiri document from the response.body
Extract some info and send it back in the response. The response should be UTF-8 encoded
So I came to the problem while trying to read sites that use...
I noticed that class variables @@my_class var are now looked up in the context of the instance_eval'd object in Ruby 1.9.1 whereas this was not the case in Ruby 1.8.6.
What are some other differences in behaviour of instance_eval for Ruby 1.9.1 ?
...
Is there a good library/gem for accessing Amazon SQS from ruby1.9? The Amazon ruby example and right_aws do not work as-is with ruby1.9.
I'd strongly prefer something that's known to work under reasonably heavy load (a few hundred thousand queue items or more per day).
...
I'm currently using the RubyTidy Ruby bindings for HTML tidy to make sure HTML I receive is well-formed. Currently this library is the only thing holding me back from getting a Rails application on Ruby 1.9. Are there any alternative libraries out there that will tidy up chunks of HTML on Ruby 1.9?
...
Unfortunately, the Unicode 0.1 (sudo gem install unicode) doesn't work on Ruby 1.9. I have the following snippet:
require "rubygems"
require "unicode"
str = "áéíóúç"
Unicode.normalize_KD(str).gsub(/[^\x00-\x7F]/n, "")
#=> aeiouc
I use it to convert titles to permalink, without removing accented characters.
Is there a way of converti...
This question is not about how to use Enumerators in Ruby 1.9.1 but rather im curious how they work. Here is some code:
class Bunk
def initialize
@h = [*1..100]
end
def each
if !block_given?
enum_for(:each)
else
0.upto(@h.length) { |i|
yield @h[i]
}...
Hi,
I have a Ruby on Rails application I'm using Ruby 1.9 and Rails 2.3.4 and I want users to upload videos so I installed Paperclip gem but I'm getting this error from Rack. The fact that it says it's "invalid byte sequence" makes me suspect that it's from Ruby 1.9.
any ideas?
Thanks,
Tam
Rendering posts/new
Rendered posts/_form (...
Hi,
I'm using Ruby 1.9 and Rails 2.3.4 with Paperclip gem to save attachments. and I followed tutorial by adding the proper migration, adding (has_attached_file :video) to the model, making the form (multipart) and adding <%= f.file_field :video %> to it...
When I try to upload a file I look in the log and I see:
[paperclip] Saving at...
I've setup Ruby 1.9.1 (p234) on a Ubuntu server. I'm trying to deploy a Rails app which vendors Rails 2.3-stable on Apache 2.2/Passenger 2.2.5.
GET requests work fine, POST requests break immediately with the following log entry:
Processing UsersController#new (for 80.203.77.44 at 2009-10-24 20:54:55) [GET]
Parameters: {"controller"=...
With the Ruby 1.9.2 release on the horizon, it's time to get developers excited about Ruby 1.9. What are some nice things you can do in Ruby 1.9 that you can't do in Ruby 1.8?
...
Hello,
There are quite a few versions of Ruby 1.9 floating around. There are a few Ruby 1.9 builds for the different operating systems at the official Ruby language site here:
http://www.ruby-lang.org/en/downloads/
There are also other 1.9 versions at Ruby Forge:
http://rubyforge.org/frs/?group_id=167&release_id=38052
What are the...
Last week I successfully completed the transition of all our company applications from Ruby 1.8.6 to Ruby 1.8.7 including local and remote configurations.
From now on, development won't need to ensure backward-compatibility with Ruby 1.8.6.
For the sake of curiosity, I tried to run the test suite of a couple of projects against Ruby 1.9...
Why does this work the way it does? I thought it had something to do with pass-by-reference/value, but that's not the case. Does it have something to do with the new block scopes?
def strip_ids(array)
array.each{ |row| row.reject! {|k, v| k =~ /_id/ } }
end
class Foo
attr_accessor :array
def initialize
@array = []
@array...
For giggles I tried to start my blog using ruby 1.9. All the gems compile and work, but I crank it up and open it in a browser, I get this:
Many newlines
I haven't found any useful information regarding this.
Code for the application is located here
...
I checked out the latest Ruby version, to play a bit with the latest changes. The first thing I tried to do was call a Ruby lambda/block/proc just like you'd do with a Python callable.
a = lambda {|x| puts x}
a.call(4) # works, and prints 4
a[4] # works and prints 4
a.(4) # same
a(4) # undefined method 'a' for main:Object
Why isn't th...