Skip to content
This repository

Kidsruby doesn't start on macosx with latest installer #22

Closed
dscataglini opened this Issue October 03, 2011 · 42 comments

9 participants

Diego Scataglini Ron Evans Phil Cohen Dreyfuzz Mark Sobkowicz ppk007 Paul O'Keeffe Kia Kroas kerbisch
Diego Scataglini

On mac os x 10.6.8 build 10k549 running RVM
when clicking on KidsRuby.app from (Kids Ruby 0.7.0 Installer) I get
LSOpenURLsWithRole() failed with error -10810 for the file /Applications/KidsRuby/KidsRuby.app
the irb works

Diego Scataglini

It might have not install the qt library.
When running ruby /Application/KidsRuby/kidsruby/main.rb I get
/Users/developer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': no such file to load -- Qt (LoadError)
from /Users/developer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
require'
from kidsruby/main.rb:3:in `'

Phil Cohen

Hi Diego,

We have seen something similar a few times now (Qt is quite problematic). A few questions:

  • Were there any errors during the install process?
  • Have you tried reinstalling?
  • Do you have parental controls enabled?
  • Can you run from source if you clone the repo?

Let us know and we'll look in to it. Thanks.

Diego Scataglini
Diego Scataglini

It seems it doesn't have rights to write to the folder when installing gems.
I am going to change the folder rights (/usr/local/kidsruby/ruby/lib/ruby/gems/) so that it will install but it should be fixed.

Starting KidsRuby install...
Creating installation directory...
Creating code directory...
Installing Qt...
Checksumming Driver Descriptor Map (DDM : 0)…
Driver Descriptor Map (DDM : 0): verified CRC32 $CB199E20
Checksumming Apple (Apple_partition_map : 1)…
Apple (Apple_partition_map : 1): verified CRC32 $AD394305
Checksumming disk image (Apple_HFS : 2)…
disk image (Apple_HFS : 2): verified CRC32 $C4D2DADD
Checksumming (Apple_Free : 3)…
(Apple_Free : 3): verified CRC32 $00000000
verified CRC32 $E1C3D8BE
/dev/disk2 Apple_partition_scheme

/dev/disk2s1 Apple_partition_map

/dev/disk2s2 Apple_HFS /Volumes/Qt 4.7.3
installer: Package name is Qt
installer: Upgrading at base path /
installer: Preparing for installation….....
installer: Preparing the disk….....
installer: Preparing Qt….....
installer: Waiting for other installations to complete….....
installer: Configuring the installation….....
installer:

....
lots of stuff
....
#
installer: Writing package receipts….....
##
installer:

installer: Finishing the Installation….....
installer:

#
installer: The software was successfully installed......
installer: The upgrade was successful.
"disk2" unmounted.
"disk2" ejected.
Installing git...
Checksumming Driver Descriptor Map (DDM : 0)…
Driver Descriptor Map (DDM : 0): verified CRC32 $5EA22453
Checksumming Apple (Apple_partition_map : 1)…
Apple (Apple_partition_map : 1): verified CRC32 $FEF2E05C
Checksumming disk image (Apple_HFS : 2)…
disk image (Apple_HFS : 2): verified CRC32 $F43F176F
Checksumming (Apple_Free : 3)…
(Apple_Free : 3): verified CRC32 $00000000
verified CRC32 $F500E752
/dev/disk2 Apple_partition_scheme

/dev/disk2s1 Apple_partition_map

/dev/disk2s2 Apple_HFS /Volumes/Git 1.7.6 i386 Snow Leopard
installer: Package name is Git 1.7.6 i386
installer: Upgrading at base path /
installer: Preparing for installation….....
installer: Preparing the disk….....
installer: Preparing Git 1.7.6 i386….....
installer: Waiting for other installations to complete….....
installer: Configuring the installation….....
installer:

installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing package receipts….....
##
installer: Running installer actions…
installer:

installer: Finishing the Installation….....
installer:

#
installer: The software was successfully installed......
installer: The upgrade was successful.
"disk2" unmounted.
"disk2" ejected.
Installing Ruby 1.9.2...
Installing gems...
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/kidsruby/ruby/lib/ruby/gems/1.9.1 directory.
Installing qtbindings gem...
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/kidsruby/ruby/lib/ruby/gems/1.9.1 directory.
Installing gosu gem..
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/kidsruby/ruby/lib/ruby/gems/1.9.1 directory.
Installing kidsruby editor...
Installing commands...
KidsRuby installation complete. Have fun!

Phil Cohen

Thanks for digging in to this. We'll take a look.

/cc @deadprogrammer

Ron Evans
Owner

The installer should have popped up to ask for Admin rights when first running the installer. Did it?

Also wondering if you might have changed the permissions in that dir at some point? The people who reported this issue are all developers, "normal" users have not. Something related to that?

All good clues, I hope we can pin this down soon...

Dreyfuzz

I had the same exact issue. Installer did ask for permissions. I found that /usr had only read permission for everyone, and no permissions listed for my account. This could be an artifact of the network accounts we have set up at my school with OpenDirectory, although I am on a local account. I added my account and assigned Read/Write Access, then applied to all enclosed items. I still got the error "You don't have write permissions into the /usr/local/kidsruby/ruby/lib/ruby/gems/1.9.1 directory." for all three gems, so I trashed /Applications/kidsruby/ and /usr/local/kidsruby/ and restarted. Only then did the installation complete without errors and KidsRuby would start.

I think following the steps above should get anyone with this error up and running. Developers: there should really be some kind of notification that the installation completed with errors, without having to go into the log.

EDIT:
KidsRuby crashes whenever I try to execute any code. Lessons and help files work, but as soon as I hit Run, that's it. It looks like Qt isn't installing:

Volumes/Qt 4.7.3
installer: This package requires authentication to install.
"disk2" unmounted.
"disk2" ejected.
Installing git...

This one I don't know how to fix. I'm an admin and I typed in my password, so I don't know what other kind of authentication could be required. I'll try installing from source and post again.

EDIT 2:
I selected my whole local hard drive and applied my read/write permissions, then reinstalled. Installed again and still get the same error about installing Qt, but now I can run code. Success? Only time will tell.

Mark Sobkowicz

I had the same problem as dscatasglini, though I am on 10.7.1. I'm evaluating Ruby tools to use with high school students in an introductory programming class. I'm excited about KidsRuby and would love to evaluate it.

Dreyfuzz
Ron Evans
Owner

It is not special permissions that we set, seems to be particular permissions set on certain machines as default. This is probably more correctly an issue with the KidsRuby installer for OSX.

ppk007

Something really weird is going on during the install. In summary, my suspicion is that the installer is copying over an existing installation of Ruby 1.9.2 from my machine and not changing ownership to the installing user which is causing the permission issues. I have tried rm -rf /usr/local/kidsruby and this still happens.

I hope this helps.

First, here is the error message for context:

Installing Ruby 1.9.2...
Installing gems...
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/local/kidsruby/ruby/lib/ruby/gems/1.9.1 directory.
Installing qtbindings gem...
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/local/kidsruby/ruby/lib/ruby/gems/1.9.1 directory.
Installing gosu gem..
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/local/kidsruby/ruby/lib/ruby/gems/1.9.1 directory.
Installing kidsruby editor...
Installing commands...
KidsRuby installation complete. Have fun!

Next, when I did an ls -l on /usr/local/kidsruby/, lib is owned by root but ruby is owned by another user NOT the user that I'm logged in as.

I am logged in and installing as the "family" user. Note that the owner of the lib directory is user "ppk". All the files and directories below this directory are also owned by "ppk". Utterly weird.

pear:kidsruby family$ ls -l
total 0
drwxr-xr-x  12 root  admin  408 Nov 11 09:31 lib
drwxr-xr-x   6 ppk   staff  204 Sep  9 00:04 ruby

pear:gems family$ pwd
/usr/local/kidsruby/ruby/lib/ruby/gems
pear:gems family$ ls -l
total 0
drwxr-xr-x  6 ppk  staff  204 Sep  9 00:04 1.9.1
pear:gems family$ 
Ron Evans
Owner

Thank you for the detailed bug report!

ppk007

NP. Is there a way for me to access the gems directly out of the dmg? I can then copy it over and chown the directories.

Ron Evans
Owner

I think this commit hybridgroup/kidsrubyinstaller-osx@fa5210b should correct this problem. I will comment again once we have a test version available.

Ron Evans
Owner

Here is a build of the KidsRuby Installer for OSX that should correct your issue: https://s3.amazonaws.com/kidsruby/osx/kidsrubyinstaller-0.7.1.dmg

Please let me know how it works, so I can perhaps close this issue. Thanks!

ppk007
ppk007
Ron Evans
Owner

It does work on default Lion config. You must have non-standard security permission in that directory. What does

ls -l /usr/local/kidsruby
ls -l /usr/local/kidsruby/ruby/lib/ruby/gems
ls -l /usr/local/kidsruby/ruby/lib/ruby/gems

show for you?

Ron Evans
Owner

How do I know it works on default config? This is what I did:

  1. Buy new iMac
  2. Do initial setup out of the box
  3. Install KidsRuby from the 0.7.1 installer. It works.
Ron Evans
Owner

anyone trying this reinstall, also make sure to trash /Applications/KidsRuby/ and /usr/local/kidsruby/ to get a clean install first.

Ron Evans
Owner

This version might get around even the preexisting permissions problem you have https://s3.amazonaws.com/kidsruby/osx/kidsrubyinstaller-0.7.2.dmg

ppk007
Ron Evans deadprogram closed this December 16, 2011
Ron Evans
Owner

Excellent! Closing...

Paul O'Keeffe

I am experiencing exactly the behaviour that ppk007 has described. Installed on an iMac which has had no developer tools installed on it, so permissions should be fairly standard for normal users. Used version 1.2.4 of the Mac OS X installation package.

Should this issue be reopened?

Ron Evans
Owner
Paul O'Keeffe
kef commented January 01, 2013

No worries. Anything I can do to help? Can you point me at the problem area in the installer? Or git commits where this is being fixed? Having dug through the installer code, I'm now intrigued to find out what caused this problem.

One thing I noticed is that all of my system files and directories in / are owned by my account rather than root:wheel on the problem machine. Related?

Paul O'Keeffe
kef commented January 01, 2013

Spotted the new bad-gem-permissions branch. Looks like what I'm after.

Kia Kroas

Yeah, trying to debug it. I'm now stuck on a setuid/setgid/$SAFE issue with rubygems. Looks like it doesn't like running under safe mode when installing... which is unfortunate because that's what the platypus installer packager does..

But you said all your system files are now under your account? I can see it being just /usr/local/kidsruby but we don't even touch the root directory...at least we shouldn't.

Paul O'Keeffe
kef commented January 01, 2013

I suspect my system files might have already been under my account and that this might have been the trigger which caused the KidsRuby installer to have a problem. Perhaps /usr/local already existed and was owned by my account? Seems that I already had homebrew on the machine, so my comment above was incorrect (#22 (comment)).

Paul O'Keeffe
kef commented January 01, 2013

Interestingly, the unrelated user which owns the kidsruby files after installation has id 501, which is the first normal user set up on a Mac OSX machine. My account, with which I ran the installer has id 504.

Ron Evans
Owner

I have a test build of some changes from the https://github.com/hybridgroup/kidsrubyinstaller-osx/tree/pre-install-gems branch of the OSX installer that can be downloaded here: https://s3.amazonaws.com/kidsruby/osx/kidsrubyinstaller-1.3.2a.dmg

I would be most appreciative to anyone who can give it a try, and let me know how it works. Thanks!

Ron Evans deadprogram reopened this January 03, 2013
kerbisch

Sorry to say, I tried installing it on my Mac (10.6.8), and after the 'successfully installed' message, got the same closing-on-launch behavior as before. Looking forward to the next build.

Ron Evans
Owner
Ron Evans
Owner
kerbisch
Ron Evans
Owner

Please open terminal, then type:

rm /usr/local/kidsruby

kerbisch
Ron Evans
Owner

Sorry, the inline images did not appear. In any case, as long as you are trying the https://s3.amazonaws.com/kidsruby/osx/kidsrubyinstaller-1.3.2a.dmg installer you do not need to re-download it.

Get any errors form the Console app (/Applications/Utilities/Console.app if you are still unable to install.

Thanks!

kerbisch
Ron Evans
Owner

Thanks for the detailed log. I've just built a newer installer for you to try https://s3.amazonaws.com/kidsruby/osx/kidsrubyinstaller-1.3.2b.dmg

Please remove both /Applications/KidsRuby and /user/local/kidsruby folders as before, then please try this newer installer, and let me know what happens for you.

Thank you again for the help tracking this down!

kerbisch
Ron Evans
Owner

Great! Thanks for helping get this worked out.

Ron Evans deadprogram closed this June 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.