ruby-1.9

Ruby 1.9 Ramaze App Failing with “Illegal instruction”

爷,独闯天下 提交于 2019-12-01 21:01:56
I've got an app that I'm trying to get working again after wiping my system and installing Snow Leopard. I installed Ruby 1.9 from Macports (now a later version) and the dev server starts up just fine, but then dies on the first request, only telling me "Illegal instruction". I have no idea what's causing this or even how to go about debugging it. Does anyone have any ideas? "Illegal instruction" is usually an error message from the CPU meaning some piece of binary code you tried to run contained an instruction that is not implemented on that particular CPU. This can have multiple reasons: The

What's discouraging you from writing ruby 1.9-specific code? [closed]

穿精又带淫゛_ 提交于 2019-12-01 20:56:35
So far, I've been merely using YARV (ruby 1.9) as merely a faster implementation of ruby than ruby 1.8, and ensured that all of my code is backwards-compatible with ruby 1.8.6. What circumstances, if any, are stopping you from writing 1.9-specific code? One reason per answer. neutrino Also, if we're talking about rails, then the problem there is the compatibility of gems/plugins with ruby 1.9. I'm sure everyone who wants to upgrade to 1.9 keeps an eye on isitruby19.com The first release candidate for Ruby 1.9.2 is due end of May and I believe many are waiting for 1.9.2 to hop on the 1.9 train.

What's discouraging you from writing ruby 1.9-specific code? [closed]

旧时模样 提交于 2019-12-01 20:19:21
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . So far, I've been merely using YARV (ruby 1.9) as merely a faster implementation of ruby than ruby 1.8, and ensured that all of my code is backwards-compatible with ruby 1.8.6. What circumstances, if any, are stopping you from writing 1.9-specific code? One reason per answer. 回答1:

debug rails 3.1.1 application

a 夏天 提交于 2019-12-01 11:23:48
I'm try to add a debugger to my rails 3.1.1 application which uses ruby 1.9.2. I have added the following to my gemfile: gem 'ruby-debug19', :require => 'ruby-debug' and I get the following error: /.rvm/gems/ruby-1.9.2-p290@rails31/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:55:in `block (2 levels) in initialize': uninitialized constant Debugger::LocalInterface::Readline (NameError) by the way i have the following: $ ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] $ rails -v Rails 3.1.1 $ rvm -v rvm 1.8.6 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm

debug rails 3.1.1 application

坚强是说给别人听的谎言 提交于 2019-12-01 09:09:21
问题 I'm try to add a debugger to my rails 3.1.1 application which uses ruby 1.9.2. I have added the following to my gemfile: gem 'ruby-debug19', :require => 'ruby-debug' and I get the following error: /.rvm/gems/ruby-1.9.2-p290@rails31/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:55:in `block (2 levels) in initialize': uninitialized constant Debugger::LocalInterface::Readline (NameError) by the way i have the following: $ ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] $

how do you start ruby 1.9 without rubygems

二次信任 提交于 2019-12-01 05:13:27
I want my app to not be able to use any installed gems. Is there a ruby 1.9 startup parameter or way of doing this programmatically? ruby --disable-gems is the MRI (1.9) commandline parameter. "It prevents the addition of gem installation directories to the default load path". (The Ruby Programming Language, p. 391) Edit 25-10-2012: Ruby core had the same idea as @rogerdpack in the comments and added the more verbose ruby --help parameter. Ruby revision! Looking at the rubygems configuration file , I would attempt to hack out gempath or gemhome to see if you can override (instead of just

Escape status within a string literal as argument of `String#tr`

梦想的初衷 提交于 2019-12-01 03:14:57
问题 There is something mysterious to me about the escape status of a backslash within a single quoted string literal as argument of String#tr . Can you explain the contrast between the three examples below? I particularly do not understand the second one. To avoid complication, I am using 'd' here, which does not change the meaning when escaped in double quotation ( "\d" = "d" ). '\\'.tr('\\', 'x') #=> "x" '\\'.tr('\\d', 'x') #=> "\\" '\\'.tr('\\\d', 'x') #=> "x" 回答1: Escaping in tr The first

Disabling echo from webrick

陌路散爱 提交于 2019-12-01 02:45:38
How can I disable messages from webrick echoed on to the terminal? For the INFO messages that appear at the beginning, I was able to disable it by setting the Logger parameter so as: s = WEBrick::HTTPServer.new( Port: 3000, BindAddress: "localhost", Logger: WEBrick::Log.new("/dev/null"), ) But I further want to disable the messages that look like: localhost - - [17/Jun/2011:10:01:38 EDT] "GET .... HTTP/1.1" 200 0 http://localhost:3000/ -> ..... when a request is made from the web browser. Following the link to the source and suggestion provied by Yet Another Geek, I was able to figure out a

Disabling echo from webrick

假如想象 提交于 2019-11-30 22:34:59
问题 How can I disable messages from webrick echoed on to the terminal? For the INFO messages that appear at the beginning, I was able to disable it by setting the Logger parameter so as: s = WEBrick::HTTPServer.new( Port: 3000, BindAddress: "localhost", Logger: WEBrick::Log.new("/dev/null"), ) But I further want to disable the messages that look like: localhost - - [17/Jun/2011:10:01:38 EDT] "GET .... HTTP/1.1" 200 0 http://localhost:3000/ -> ..... when a request is made from the web browser. 回答1

How to convert a Net::HTTP response to a certain encoding in Ruby 1.9.1?

人走茶凉 提交于 2019-11-30 13:01:41
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 windows-1256 encodings like www.filfan.com or www.masrawy.com. The problem is the result of the encoding conversion is not correct though no errors are thrown. The net/http response.body.encoding gives ASCII-8BIT which can not be converted to UTF-8 If I do