ip2k / google-api-ruby-client

Automatically exported from code.google.com/p/google-api-ruby-client
Apache License 2.0
0 stars 0 forks source link

No such file or directory - uname -sr (Errno::ENOENT) #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install RailsInstaller 2.0 on Windows XP Machine
2. Follow README.txt instructions of the google-plus-ruby-starter
3. run ruby app.rb

What is the expected output? What do you see instead?
============ Error produced below =========================
C:\Sites\google-plus-ruby-starter>ruby app.rb
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/google-api-client-0.2.0/lib
/google/api_client/environment.rb:9:in ``': N
o such file or directory - uname -sr (Errno::ENOENT)
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/google-api-client-0.2.0/lib/google/api_client/environment.r
b:9:in `<module:ENV>'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/google-api-client-0.2.0/lib/google/api_client/environment.r
b:3:in `<class:APIClient>'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/google-api-client-0.2.0/lib/google/api_client/environment.r
b:2:in `<module:Google>'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/google-api-client-0.2.0/lib/google/api_client/environment.r
b:1:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/google-api-client-0.2.0/lib/google/api_client.rb:21:in `<to
p (required)>'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:57:in `require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:57:in `rescue in require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from app.rb:12:in `<main>'

What version of the product are you using? On what operating system?
api version:
os version: Windows XP SP3

Please provide any additional information below.
This is how I fixed it.
================= FIX ========================
change line 9 in environment.rb
from: 'uname -sr'.sub(' ', '/')
to:   "uname -sr".sub(' ', '/')

I'm not sure if that breaks anything else since I'm new to Ruby. But that being 
said, it worked for me.

Original issue reported on code.google.com by nicholas...@gmail.com on 5 Oct 2011 at 7:19

GoogleCodeExporter commented 9 years ago
That's not actually a fix. What you did was to cause the command to simply 
never get executed.

Which prevents the error, but doesn't actually make the code work as intended.

Unfortunately, this means I need to set up a Windows development environment, 
which I don't currently have.

Original comment by bobaman@google.com on 5 Oct 2011 at 10:23

GoogleCodeExporter commented 9 years ago
Issue 18 has been merged into this issue.

Original comment by bobaman@google.com on 6 Oct 2011 at 9:37

GoogleCodeExporter commented 9 years ago
I wish I could help more but I'm still in the early stages of learning Ruby. If 
you want to fire off any changes that you think might work I'd be glad to test 
them in my Windows Environment.

Original comment by nicholas...@gmail.com on 6 Oct 2011 at 2:00

GoogleCodeExporter commented 9 years ago
Hello,

I have the same issue. I'm using :
* google-api-client-0.2.0
* windows 7
* ruby 1.9.2
* mingw environment

Here is the output console for the 'ver' command (as you requested in issue 
#18):

> RUBY_PLATFORM
RUBY_PLATFORM = "i386-mingw32"

> ver
NameError: undefined local variable or method `ver' for main:Object
    from (irb):1
    from C:/RailsInstaller/Ruby1.9.2/bin/irb:12:in `<main>'

Original comment by dorian.l...@gmail.com on 30 Oct 2011 at 5:39

GoogleCodeExporter commented 9 years ago
Oh, excellent, thanks for getting me the version string. That should help sort 
this out.

Original comment by bobaman@google.com on 31 Oct 2011 at 7:33

GoogleCodeExporter commented 9 years ago
Great. Please do not hesitate to ask me if you need any other information. BR. 
Dorian

Original comment by dorian.l...@gmail.com on 31 Oct 2011 at 7:45

GoogleCodeExporter commented 9 years ago
Same problem here:
* google-api-client-0.2.0
* windows 7
* ruby 1.8.7 i386-mingw32

Original comment by TCBl...@gmail.com on 8 Nov 2011 at 7:51

GoogleCodeExporter commented 9 years ago
This should be fixed on master now.

Original comment by bobaman@google.com on 16 Nov 2011 at 8:45