[MacRuby-devel] Re: Trying to get rubygems to run.

Laurent Sansonetti lsansonetti at apple.com
Tue May 6 11:17:07 PDT 2008


Hi Eloy,

I would love to keep up with the upstream source base on a day to day  
basis, but I just cannot because I don't have the time :(

The SVN repository looks like this:

   MacRuby
   |-- branches
   |---- upstream (contains the 1.9 vanilla sources of the latest  
sync, it's just a svn:externals pointer to a specific trunk revision @  
svn.ruby-lang.org)
   |-- trunk (contains the MR head sources, based on the "upstream"  
branch source code

Here is how I merge upstream changes:

1/ I synchronize branches/upstream with a recent trunk revision of  
svn.ruby-lang.org
2a/ I generate a patch between the previous revision and this one, and  
merge it in trunk (long way)
2b/ I use Changes.app [1] to manually merge every meaningful change  
(easy way)

This has been working so far, but it's not convenient for day to day  
sync. Maybe svk could help (I will read the documentation Pierce  
posted), or git-svn. Any help would be greatly appreciated!

However, MacRuby was originally supposed to be just a port of the 1.9  
source base to the ObjC runtime, but now it starts to become a  
different implementation, with some of the builtin classes rewritten  
so far. And it might change further in the future. I suspect that we  
won't have to keep up with lots of the genuine 1.9 source base.

Laurent

[1] http://changesapp.com/

On May 5, 2008, at 10:32 AM, Eloy Duran wrote:

> (Oops, reposted to ML instead of directly at Laurent)
>
> Hi Laurent,
>
> So as I mentioned to you the other day, what about using git-svn for  
> keeping up with upstream?
> I'm a bit worried about the "fork" state at the moment and would  
> really hope that we could keep up
> with upstream on a day to day basis. (As far as possible of course.)
>
> Would it be possible for you to create a huge diff off all changes  
> compared to upstream in the current macruby trunk?
> If so, I guess you could do a git-svn checkout of ruby trunk r15665,  
> then apply the diff and commit that to the git repo.
> Then do a "git-svn rebase" to merge the latest changes and see if it  
> works :)
>
> This way you could theoretically simply use "git-svn rebase" on a  
> daily basis to keep up.
>
> I'm not sure however if it's possible to then commit these changes  
> back to another svn repo...
> So you might have to switch completely to git for this to work,  
> which I wouldn't mind at all :).
>
> Depending on how fast you could make the diff, we could do this in a  
> few hours.
> Let me know if you want to discuss this further.
>
> Cheers,
> Eloy
>
> On 3 mei 2008, at 20:26, Laurent Sansonetti wrote:
>
>> Hi Eloy,
>>
>> In my environment, `macgem install foo' crashes. It also seems that  
>> there are memory leaks. As you can see I didn't try to run rubygems  
>> with trunk... yet :) I will fix that.
>>
>> FYI, the version of 1.9 on which macruby trunk is based on, is  
>> r15665. It's a pretty old version, I plan to re-sync next week.
>>
>> Thanks,
>> Laurent
>>
>> On May 3, 2008, at 10:54 AM, Eloy Duran wrote:
>>
>>> I now also have an installation of the current 1.9 trunk for  
>>> comparison.
>>> It seems that this problem does not exist there.
>>> The rubygems that comes with the current 1.9 trunk is version  
>>> 1.1.1 though.
>>>
>>> I have tried installing rubygems 1.1.1 from source in macruby, but  
>>> the same problem persists.
>>>
>>> So I'm guessing the problem lies somewhere in ruby 1.9,  
>>> specifically the current version
>>> being used in macruby. Could this be the case?
>>> (I have no idea on how to check which version is being used in  
>>> macruby.)
>>>
>>> Eloy
>>>
>>> On 3 mei 2008, at 18:41, Eloy Duran wrote:
>>>
>>>> Hi,
>>>>
>>>> (Here are some of my first minutes of playtime with MacRuby.)
>>>>
>>>> The first time I configured and made/installed MacRuby,
>>>> I noticed that zlib wasn't installed while trying to use RubyGems  
>>>> (/usr/local/bin/macgem).
>>>> I'm not exactly sure what the cause was and why the third time  
>>>> around it did make and install it.
>>>>
>>>> I had tried once to make zlib itself and it outputed that there's  
>>>> nothing to be done for all.
>>>> I then deleted the Makefile and ran: $ macruby extconf.rb and  
>>>> after that running make did work.
>>>>
>>>> But then I did a clean and a distclean and manually removed the  
>>>> Makefile again.
>>>> This time it did work... Am I the only one to have encoutered this?
>>>>
>>>> Also after that had been resolved it seemed that the gem  
>>>> directories were missing:
>>>> /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> Gems/1.9.0/cache
>>>> /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> Gems/1.9.0/doc
>>>> /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> Gems/1.9.0/gems
>>>> /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> Gems/1.9.0/specifications
>>>>
>>>> After creating those I still have a non functional rubygems.
>>>>
>>>> Trying to install a gem just hangs after:
>>>>
>>>> 1:% sudo macgem install mocha --debug
>>>> Exception `NameError' at /Library/Frameworks/MacRuby.framework/ 
>>>> Versions/0.2/usr/lib/ruby/1.9.0/rubygems/command_manager.rb:132 -  
>>>> uninitialized constant Gem::Commands::InstallCommand
>>>>
>>>> Trying to update rubygems yields:
>>>>
>>>> 137:% sudo macgem update --system --debug
>>>> Exception `NameError' at /Library/Frameworks/MacRuby.framework/ 
>>>> Versions/0.2/usr/lib/ruby/1.9.0/rubygems/command_manager.rb:132 -  
>>>> uninitialized constant Gem::Commands::UpdateCommand
>>>> Updating RubyGems...
>>>> Exception `Gem::LoadError' at /Library/Frameworks/ 
>>>> MacRuby.framework/Versions/0.2/usr/lib/ruby/1.9.0/rubygems.rb:405  
>>>> - Could not find RubyGem sources (> 0.0.1)
>>>>
>>>> Exception `EOFError' at /Library/Frameworks/MacRuby.framework/ 
>>>> Versions/0.2/usr/lib/ruby/1.9.0/net/protocol.rb:135 - end of file  
>>>> reached
>>>> Exception `EOFError' at /Library/Frameworks/MacRuby.framework/ 
>>>> Versions/0.2/usr/lib/ruby/1.9.0/net/protocol.rb:120 - end of file  
>>>> reached
>>>> ERROR:  While executing gem ... (EOFError)
>>>> end of file reached
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/protocol.rb:135:in `sysread'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/protocol.rb:135:in `block in rbuf_fill'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/timeout.rb:52:in `timeout'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/timeout.rb:82:in `timeout'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/protocol.rb:134:in `rbuf_fill'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/protocol.rb:116:in `readuntil'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/protocol.rb:126:in `readline'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/http.rb:2130:in `read_status_line'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/http.rb:2119:in `read_new'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/http.rb:1112:in `transport_request'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/http.rb:1098:in `request'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/http.rb:1091:in `block in request'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/http.rb:559:in `start'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/net/http.rb:1089:in `request'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/remote_fetcher.rb:71:in `fetch_size'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/source_info_cache_entry.rb:26:in `refresh'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/source_info_cache.rb:135:in `block in refresh'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/source_info_cache.rb:128:in `each'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/source_info_cache.rb:128:in `refresh'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/source_info_cache.rb:40:in `cache'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/source_info_cache.rb:50:in `search'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/commands/update_command.rb:67:in `execute'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/command.rb:136:in `invoke'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/command_manager.rb:104:in `process_args'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/command_manager.rb:74:in `run'
>>>> 	/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
>>>> 1.9.0/rubygems/gem_runner.rb:39:in `run'
>>>> 	/usr/local/bin/macgem:22:in `<main>'
>>>>
>>>> Cheers,
>>>> Eloy
>>>
>>> _______________________________________________
>>> MacRuby-devel mailing list
>>> MacRuby-devel at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo/macruby-devel
>>
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/macruby-devel



More information about the MacRuby-devel mailing list