Google Groups Home
Help | Sign in
checking OS?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Matt Williams  
View profile
 More options Jul 24, 2:06 pm
From: Matt Williams <otter...@gmail.com>
Date: Thu, 24 Jul 2008 14:06:19 -0400
Local: Thurs, Jul 24 2008 2:06 pm
Subject: checking OS?
Could someone on OSX do the following for me?

1. load irb
2. execute the following:
require 'rconfig'
p Config::CONFIG["target_os"]

Thanks

If you're curious, I'm porting xrefresh-server to linux (it's on OSX
right now) -- it is for a "windows-only" firefox plugin which will
update a tab containing a website/url when a file which is a dependency
for that url is changed/added/updated.

Thanks again,
Matt


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Darby  
View profile
 More options Jul 24, 2:10 pm
From: Matt Darby <m...@matt-darby.com>
Date: Thu, 24 Jul 2008 14:10:11 -0400
Local: Thurs, Jul 24 2008 2:10 pm
Subject: Re: [CRB] checking OS?
On Jul 24, 2008, at 2:06 PM, Matt Williams wrote:

> Could someone on OSX do the following for me?

> 1. load irb
> 2. execute the following:
> require 'rconfig'
> p Config::CONFIG["target_os"]

mdarby@macbook:~:  
irb
                                                                                                                                                      >
 > require 'rconfig'
LoadError: no such file to load -- rconfig
         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in  
`gem_original_require'
         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in  
`require'
         from (irb):1
         from :0
 >> exit
mdarby@macbook:~: ./script/console
Loading development environment (Rails 2.1.0)
 >> require 'rconfig'
MissingSourceFile: no such file to load -- rconfig
         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in  
`gem_original_require'
         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in  
`require'
         from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:509:in `require'
         from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:354:in `new_constants_in'
         from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:509:in `require'
         from (irb):1
 >> exit
mdarby@macbook:~: gem install rconfig
ERROR:  could not find gem rconfig locally or in a repository

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe OBrien  
View profile
 More options Jul 24, 2:11 pm
From: Joe OBrien <j...@theedgecase.com>
Date: Thu, 24 Jul 2008 14:11:46 -0400
Local: Thurs, Jul 24 2008 2:11 pm
Subject: Re: [CRB] checking OS?
[objo-laptop | scripsafe ] $ irb
 >> require 'rconfig'
LoadError: no such file to load -- rconfig

I didn't see it in the gems list.

-Joe
_______________
Joe O'Brien, artisan
EdgeCase
theedgecase.com

614/453-5527

On Jul 24, 2008, at 2:06 PM, Matt Williams wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Briones  
View profile
 More options Jul 24, 2:13 pm
From: "Ryan Briones" <ryan.brio...@brionesandco.com>
Date: Thu, 24 Jul 2008 14:13:22 -0400
Local: Thurs, Jul 24 2008 2:13 pm
Subject: Re: [CRB] checking OS?

I think you meant 'rbconfig' instead of 'rconfig':
/Users/ryanbriones ~ irb

>> require 'rbconfig'
=> false
>> Config::CONFIG['target_os']

=> "darwin9.0"

--
Ryan Carmelo Briones

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Briones  
View profile
 More options Jul 24, 2:14 pm
From: "Ryan Briones" <ryan.brio...@brionesandco.com>
Date: Thu, 24 Jul 2008 14:14:15 -0400
Local: Thurs, Jul 24 2008 2:14 pm
Subject: Re: [CRB] checking OS?

BTW, i'm on OS X Leopard.

On Thu, Jul 24, 2008 at 2:13 PM, Ryan Briones <ryan.brio...@brionesandco.com>
wrote:

--
Ryan Carmelo Briones

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Williams  
View profile
 More options Jul 24, 2:58 pm
From: Matt Williams <otter...@gmail.com>
Date: Thu, 24 Jul 2008 14:58:44 -0400
Local: Thurs, Jul 24 2008 2:58 pm
Subject: Re: [CRB] Re: checking OS?
Yes, sorry, I fat-fingered it.

Thanks,
Matt


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Williams  
View profile
 More options Jul 24, 2:59 pm
From: Matt Williams <otter...@gmail.com>
Date: Thu, 24 Jul 2008 14:59:01 -0400
Local: Thurs, Jul 24 2008 2:59 pm
Subject: Re: [CRB] Re: checking OS?
I'm sorry, I meant rbconfig
Matt


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Williams  
View profile
 More options Jul 24, 2:59 pm
From: Matt Williams <otter...@gmail.com>
Date: Thu, 24 Jul 2008 14:59:17 -0400
Local: Thurs, Jul 24 2008 2:59 pm
Subject: Re: [CRB] Re: checking OS?
I'm sorry, I meant rbconfig

thanks,
matt


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ryanmsmith  
View profile
 More options Jul 25, 8:29 am
From: ryanmsmith <rmsmit...@gmail.com>
Date: Fri, 25 Jul 2008 05:29:27 -0700 (PDT)
Local: Fri, Jul 25 2008 8:29 am
Subject: Re: checking OS?
irb(main):003:0> require 'rbconfig'
=> true
irb(main):004:0> p Config::CONFIG["target_os"]
"darwin9.2.0"
=> nil
irb(main):005:0>

OS X 10.5.4

-Ryan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Biedenharn  
View profile
 More options Jul 25, 7:41 pm
From: Rob Biedenharn <Rob.Biedenh...@gmail.com>
Date: Fri, 25 Jul 2008 19:41:06 -0400
Local: Fri, Jul 25 2008 7:41 pm
Subject: Re: [CRB] checking OS?
On Jul 24, 2008, at 2:06 PM, Matt Williams wrote:

That might not give you all the info you need.  For example, the ruby  
on Leopard is a universal binary (compare CFLAGS, LDFLAGS, and  
target_cpu to the fact that my machine is an Intel Mac).

irb> pp Config::CONFIG.select{|name,value|name=~/target|FLAG/}
[["target", "powerpc-apple-darwin9.0"],
  ["target_alias", ""],
  ["XCFLAGS", " -DRUBY_EXPORT"],
  ["target_vendor", "apple"],
  ["YFLAGS", ""],
  ["LDFLAGS", "-L. -arch ppc -arch i386"],
  ["DLDFLAGS", ""],
  ["target_cpu", "powerpc"],
  ["target_os", "darwin9.0"],
  ["RPATHFLAG", ""],
  ["ASFLAGS", ""],
  ["LIBRUBY_DLDFLAGS",
   "-install_name /System/Library/Frameworks/Ruby.framework/Versions/
1.8/usr/lib/libruby.1.dylib -current_version 1.8.6 -
compatibility_version 1.8"],
  ["XLDFLAGS", ""],
  ["CCDLFLAGS", " -fno-common"],
  ["CFLAGS", "-arch ppc -arch i386 -Os -pipe -fno-common"],
  ["LIBPATHFLAG", " -L\"%s\""],
  ["CPPFLAGS", ""],
  ["OUTFLAG", "-o "],
  ["ARCH_FLAG", ""]]
=> nil

-Rob


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
abe...@wcnet.org  
View profile
 More options Jul 25, 8:23 pm
From: abe...@wcnet.org
Date: Sat, 26 Jul 2008 00:23:47 GMT
Local: Fri, Jul 25 2008 8:23 pm
Subject: Re: [CRB] Re: checking OS?
class Platform
  def self.detect
    if RUBY_PLATFORM =~ /darwin/i
      { :os => "unix", :implementation => "macosx" }
    elsif RUBY_PLATFORM =~ /linux/i
      { :os => "unix", :implementation => "linux" }
    elsif RUBY_PLATFORM =~ /mswin/i
      { :os => "win32", :implementation => "mswin" }
    elsif RUBY_PLATFORM =~ /cygwin/i
      { :os => "unix", :implementation => "cygwin" }
    elsif RUBY_PLATFORM =~ /mingw/i
      { :os => "win32", :implementation => "mingw" }
    elsif RUBY_PLATFORM =~ /solaris/i
      { :os => "unix", :implementation => "solaris" }
    else
      { :os => "unknown", :implementation => "unknown" }
    end
  end
end

~Aaron

---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google