Project

General

Profile

Actions

Bug #1590

closed

uninitialized constant PLATFORM with Ruby 1.9

Added by Chuck Dand about 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When running bin/smart-proxy on a host running Ruby 1.9.3p125 I get the following:

  1. bin/smart-proxy
    /var/rails/smart-proxy/lib/sinatra-patch.rb:4:in `<top (required)>': uninitialized constant PLATFORM (NameError)
    from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from bin/smart-proxy:8:in `<main>'

It would appear this constant has been renamed to RUBY_PLATFORM.

Host: Linux debian 2.6.32-5-xen-amd64 #1 SMP Thu Mar 22 21:14:26 UTC 2012 x86_64 GNU/Linux
Linux: Debian 6.0
Ruby: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
smart-host from git: Branch=develop commit=commit 083405c80fe0b872b1e159abb9c2f098d3716d09


Files

Actions #1

Updated by Brian Gupta almost 12 years ago

I believe we can do a string replace for PLATFORM with RUBY_PLATFORM as ruby 1.8.7 also supports RUBY_PLATFORM.

~/git/smart-proxy$ irb
irb(main):003:0> puts RUBY_PLATFORM
x86_64-linux
=> nil
irb(main):004:0> puts PLATFORM
x86_64-linux
=> nil
irb(main):005:0>

Testing and a patch or pull request would be welcome.

Actions #2

Updated by Chuck Dand almost 12 years ago

This patch has been tested with ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]

I have not verified operation with Ruby 1.8.

Actions #3

Updated by Ohad Levy almost 12 years ago

  • Status changed from New to Resolved

the proxy has recently updated to support 1.9, so I'm hoping this is no longer releavnt, please reopen if it does. thanks!

Actions

Also available in: Atom PDF